This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "webpack-test-project", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "ISC", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require './app/services/fog_service' | |
require 'task_helpers/clean_up_helper' | |
task :upload_jobs do | |
Dir.glob("tmp/uploads/*/*.*") do |file| | |
age = CleanUpHelper.file_age(file) | |
if age > 300 | |
fog = FogService.create | |
destination = fog.directories.get('default-submissions-uploads') | |
destination.files.create(key: file.split("/").last, body: File.read(file)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "first_react_component", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "karma start --singleRun", | |
}, | |
"author": "", | |
"license": "ISC", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Cell from "../../app/assets/javascripts/Cell.es6"; | |
describe("Cell", function() { | |
var cell; | |
beforeEach(() => { | |
cell = new Cell(false, 1, 1); | |
}); | |
it("should respond properly to methods", () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unless Rails.env.production? | |
# Make sure Browserify is triggered when asked to serve javascript spec files | |
config.browserify_rails.paths << lambda { |p| | |
p.start_with?(Rails.root.join("spec/javascripts").to_s) | |
} | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem "browserify-rails" | |
group :development, :test do | |
# Your choice of test library. | |
# Also available, teaspoon-mocha / teaspoon-qunit | |
gem "teaspoon-jasmine" | |
# Teaspoon's front-end is written in CoffeeScript but it's not a dependency | |
gem "coffee-script" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// import Cell class | |
import Cell from './Cell.es6'; | |
class World { | |
constructor (cols, rows) { | |
this.cols = cols; | |
this.rows = rows; | |
this.cellGrid = []; | |
this.makeGrid(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/application.rb | |
# Configure Browserify to use babelify to compile ES6 | |
config.browserify_rails.commandline_options = "-t [ babelify --presets [ es2015 ] ]" | |
# Run on all javascript files | |
config.browserify_rails.force = true | |
# Alternatively, only run on .es6 files | |
# config.browserify_rails.force = ->(file) { File.extname(file) == ".es6" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Cell { | |
constructor(alive, x, y) { | |
this.alive = alive; | |
this.x = x; | |
this.y = y; | |
} | |
die () { this.alive = false; } | |
revive () { this.alive = true; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "something", | |
"dependencies" : { | |
"browserify": "~10.2.4", | |
"browserify-incremental": "^3.0.1" | |
}, | |
"license": "MIT", | |
"engines": { | |
"node": ">= 0.10" | |
} |