Gathering detailed insights and metrics for generator-rails-react-browserify
Gathering detailed insights and metrics for generator-rails-react-browserify
Gathering detailed insights and metrics for generator-rails-react-browserify
Gathering detailed insights and metrics for generator-rails-react-browserify
Scaffolding Rails app with react.js and browserify
npm install generator-rails-react-browserify
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (70.42%)
Ruby (14.45%)
CSS (13.63%)
HTML (1.5%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
3 Stars
125 Commits
1 Forks
1 Watchers
1 Branches
2 Contributors
Updated on Jul 09, 2019
Latest Version
0.6.0
Package Id
generator-rails-react-browserify@0.6.0
Size
10.76 kB
NPM Version
2.10.1
Node Version
2.1.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Yeoman generator
To install generator-rails-react-browserify
from npm, run:
1$ npm install -g generator-rails-react-browserify
Create Ruby on Rails project with normal rails
command, but skip gem bundling:
1$ rails new app-name --skip-bundle
Then, initiate the generator:
1$ cd app-name 2$ yo rails-react-browserify
Answer 'Yes' to all 'Overwrite' actions. Then, update 'config/database.yml' if you use different database than 'sqlite3'.
npm install -g bower
I define all my javascript modules in 'app/frontend/javascripts', which will be compiled into 'app/assets/javascript/build' folder later.
Append suffix .bundle.js for each built module.
application/
|- app/
| |- frontend/
| | |- javascripts/
| | | |- <page-module>.bundle.js
Change the default configuration for built glob in config/browserify/config.json
if you want to use other suffix than '.bundle.js'
Manage development dependencies for javascript with incremental rebuilding for each module. Turn ES6+ code into vanilla ES5
using 6to5 with the support of Browserify for javascript moduling. Inject
regeneratorRunTime
environment to support ES6 generators feature which allows you to using modern javascript libraries like
js-csp today. Contain transform configurations for browserify-shim.
Make sure that view their recipes for more informations.
config/browserify/config.json
is responsible for controlling development and production build for javascript modules. Additionally, you can
define extra configurations here, then, it will be loaded into javascript-build.js
via config = require('./config.json');
config/browserify/errors-handler.js
is responsible for errors handling. Currently, there is only Browserify
has use this functionsconfig/browserify/javascript-build.js
is responsible for transforming ES6+ into ES5 and building javascript modules.Add require('babel/pollyfill');
to support es6 generator syntax at the top level bundle
node__modules/some_modules
Specify transformation on the node_modules/module/package.json
itself
1"browserify": { "transform": [ "babelify" ] },
Use global transform
1b.transform(transform, { global: true });
1$ gulp javascript:clean # remove the build folder placed at 'app/assets/javascripts/build' 2$ gulp javascript:dev # watch over changes for multiple js bundle, rebuild for each module that changes 3$ gulp javascript:dev --only main.bundle.js # watch over changes for single js module 4$ gulp javascript:build # build for production with no source map
Run these commands, and start coding
1$ gulp javascript:dev
1$ rails server
Compile your assets before deploying to production server
1$ gulp javascript:build 2$ rake assets:precompile RAILS_ENV=production
Name: mongoid (for mongodb)
add --skip-active-record
option to your rails new app --skip-active-record
command before selecting this option.
For using livereload utility, firstly, install guard. Then, use rack-livereload or install LiveReload Safari/Chrome extension
1$ bundle exec guard # to run the guard server and enjoy coding
Test files are placed in the same folder with component.
▾ home/
home-test.js
home.js*
Use iojs instead of node to run mocha test (See more here). And update mocha config
if you need to in package.json
1npm test
1npm run test-converage # generate test coverage using istanbul
application/
|- app/
| |- apis/
| | |- v1/
| | | |- base.rb
| | | |- person_api.rb
| | |- base.rb
| |- assets/
| | |- images/
| | |- javascripts/
| | | |- build/
| | | | |- page-module.bundle.js
| | | |- application.js
| | |- stylesheets/
| | | |- application.css
| |- frontend/
| | |- javascripts/
| | | |- <page-module-dependencies>/
| | | |- <page-module>.bundle.js
| |- controllers/
| |- helpers/
| |- mailers/
| |- models/
| |- views/
| | |- application/
| | | |- index.html # default template for the application
| | |- layouts/
| | | |- application.html.erb
|- bin/
|- config/
| |- browserify/
| | |- config.json
| | |- errors-handler.js
| | |- javascript-build.js
| |- initializers/
| | |- bower_rails.rb # bower rails config
|- db/
|- lib/
|- log/
|- public/
|- test/
|- vendor/
| |- assets/
| | |- bower_components/
| | | |- third libararies/
|- | |- bower.json
|- Bowerfile # bower package dependencies
|- config.ru
|- gulpfile.js
|- package.json
|- config.ru
|- Gemfile
|- Gemfile.lock
|- Guardfile # Guard file for livereload
|- Rakefile
|- README.rdoc
All contributions are welcomed.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
security policy file not detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More