Railspack
A CLI tool that assists in getting Webpack setup in your Rails application.
Prerequisites
Make sure that you have node installed
The gem will install just fine without node, but you won't be able to
install any of dependencies listed in your new package.json file without
node and npm
Installation
Add this line to your application's Gemfile:
$ gem install railspack
Usage
- Go to the root directory of your Rails project.
- Run
railspack generate
Make sure that you run npm install after running the railspack generate
command. This will install all the dependencies defined in the package.json
file.
If you would like npm install to be run for you after the files have been
generated, you can pass the --install or -i option to the generate command.
railspack generate --install
or
railspack generate -i
Take a look at the Generated Files Guide page to see a full description of all the files that are generated.
Contributing
Please check out the Contributing Guide
License
The gem is available as open source under the terms of the MIT License.