Created
May 9, 2015 16:12
-
-
Save naudo/9646d314860b39e5b71e to your computer and use it in GitHub Desktop.
React + Rails Config
This file contains 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
source 'https://rubygems.org' | |
ruby '2.1.3' | |
gem 'rails', '4.1.5' | |
gem 'pg', '~> 0.17.1' | |
gem 'sass-rails', '~> 4.0.3' # Use SCSS for stylesheets | |
gem 'uglifier', '>= 1.3.0' # Use Uglifier as compressor for JavaScript assets | |
gem 'jquery-rails' # Use jquery as the JavaScript library | |
gem 'jbuilder', '~> 2.0' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder | |
# bundle exec rake doc:rails generates the API under doc/api. | |
gem 'sdoc', '~> 0.4.0', group: :doc | |
gem 'react-rails', '~> 1.0.0.pre', github: 'reactjs/react-rails' | |
gem 'bourbon', '~> 3.2' | |
gem 'neat', '~> 1.5.1' | |
gem 'bitters' | |
gem 'font-awesome-rails' | |
gem 'normalize-rails' | |
gem 'aasm' | |
gem 'fog', '~> 1.23.0', require: "fog/aws/storage" # Used for S3 Uploads | |
gem 'carrierwave', '~> 0.10.0' #Used for File uploads | |
gem 'devise', '~> 3.3.0' | |
group :production, :staging do | |
gem 'puma', '~> 2.9.1' | |
end | |
group :development, :test do | |
gem 'factory_girl_rails', '~> 4.4.1' | |
gem 'faker' | |
gem 'database_cleaner' | |
end | |
group :test do | |
gem 'minitest-reporters' | |
gem 'mocha' | |
gem 'simplecov', require: false | |
end | |
group :development do | |
gem 'spring'# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring | |
gem 'guard-minitest' | |
gem 'terminal-notifier-guard' | |
# Gems required for deploying / integeration | |
gem 'capistrano-rails', '~> 1.1.2' | |
gem 'capistrano-bundler', '~> 1.1.3' | |
end |
This file contains 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
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var source = require('vinyl-source-stream'); | |
var watchify = require('watchify'); | |
var browserify = require('browserify'); | |
var reactify = require('reactify'); | |
var notify = require("gulp-notify"); | |
var jscs = require('gulp-jscs'); | |
var jshint = require('gulp-jshint'); | |
var react = require('gulp-react'); | |
gulp.task('default', ['admin', 'app']); | |
var src = [ | |
'./app/assets/javascripts/*', | |
'!./app/assets/javascripts/bundle.js', | |
'!./app/assets/javascripts/admin.bundle.js', | |
'!./app/assets/javascripts/jquery.autosize.min.js' | |
]; | |
gulp.task('admin', function(){ | |
var bundler = watchify(browserify('./app/assets/javascripts/admin/main.js', watchify.args)); | |
bundler.transform('reactify'); | |
bundler.on('update', rebundle); | |
function rebundle() { | |
return bundler.bundle() | |
// log errors if they happen | |
.on('error', gutil.log.bind(gutil, 'Browserify Error')) | |
.on('error', notify.onError(function (error) { | |
return error.message; | |
})) | |
.pipe(source('../../admin.bundle.js')) | |
.pipe(gulp.dest('./app/assets/javascripts/admin/*')); | |
} | |
return rebundle(); | |
}); | |
gulp.task('app', function() { | |
var bundler = watchify(browserify('.', watchify.args)); | |
bundler.transform('reactify'); | |
bundler.on('update', rebundle); | |
function rebundle() { | |
return bundler.bundle({ debug: true }) | |
// log errors if they happen | |
.on('error', gutil.log.bind(gutil, 'Browserify Error')) | |
.on('error', notify.onError(function (error) { | |
return error.message; | |
})) | |
.pipe(source('bundle.js')) | |
.pipe(gulp.dest('./app/assets/javascripts/')); | |
} | |
return rebundle(); | |
}); | |
gulp.task('jscs', function() { | |
gulp.src(src) | |
.pipe(react()) | |
.pipe(jscs()); | |
}); | |
gulp.task('lint', function() { | |
gulp.src(src) | |
.pipe(react()) | |
.pipe(jshint('.jshintrc')) | |
.pipe(jshint.reporter('jshint-stylish')); | |
}); |
This file contains 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": "flux-experiment", | |
"version": "0.0.1", | |
"repository": "readacted.git", | |
"main": "./app/assets/javascripts/app.js", | |
"dependencies": { | |
"react": "~0.11.2" | |
}, | |
"devDependencies": { | |
"browserify": "~4.2.2", | |
"envify": "~2.0.1", | |
"flux": "~2.0.1", | |
"gulp": "^3.8.8", | |
"gulp-jscs": "^1.1.2", | |
"gulp-jshint": "^1.8.4", | |
"gulp-notify": "^1.7.1", | |
"gulp-react": "^1.0.2", | |
"gulp-util": "^3.0.1", | |
"jest-cli": "~0.1.18", | |
"jshint-stylish": "^1.0.0", | |
"react": "^0.11.2", | |
"react-tools": "~0.11.2", | |
"reactify": "~0.14.0", | |
"statics": "~0.1.0", | |
"uglify-js": "~2.4.15", | |
"vinyl-source-stream": "^1.0.0", | |
"watchify": "~0.10.2" | |
}, | |
"scripts": { | |
"start": "gulp default", | |
"buildTest": "NODE_ENV=production browserify . | uglifyjs -cm > ~/clone/app/assets/javascripts/bundle.min.js", | |
"build": "NODE_ENV=production browserify . | uglifyjs -cm > ./app/assets/javascripts/bundle.min.js", | |
"test": "jest" | |
}, | |
"browserify": { | |
"transform": [ | |
"reactify", | |
"envify" | |
] | |
}, | |
"jest": { | |
"scriptPreprocessor": "<rootDir>/test/jest/preprocessor.js", | |
"setupEnvScriptFile": "<rootDir>/test/jest/environment.js", | |
"testFileExtensions": [ | |
"js", | |
"js.jsx" | |
], | |
"moduleFileExtensions": [ | |
"js", | |
"js.jsx" | |
], | |
"testPathDirs": [ | |
"<rootDir>/app/assets/javascripts" | |
], | |
"unmockedModulePathPatterns": [ | |
"<rootDir>/node_modules/react" | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment