Rails 5 API with Gulp powered asset pipeline
This repo combines the most comprehensive and intuitive backend stack with a powerful anc hackable frontend automation tool. Feel free to fork and customize it with your own Rails setup and relevant Gulp tasks.
- Lean Rails 5 API backend stack
- API requests and responses with camelCased or dash-cased keys, while the backend uses snake_cased ones
- ES6 with Babel
- CommonJS
- Bundling with Browserify
- JS/CSS compression
- SASS/SCSS support
- CSS Autoprefixing
- Image web optimization
- Livereload for development environments
- Static asset revisioning with dependency considerations for production environments
- Easy Heroku deploy
- AWS S3 asset upload
- CDN asset distribution via Cloudfront
For the complete list of supported tasks type in the console:
gulp -T
Preferably use RVM or a similar tool to manage all your ruby dependencies. It's easy to install; just issue the following command at the terminal:
curl -L https://get.rvm.io | bash -s stable --ruby=2.2.2
For development purposes, use Postgres App on OSX.
brew install node
brew install yarn
gem install bundler
gem install rails
bundle install
In order to successfully deploy the app on Heroku, all js dependencies should be declared as normal dependencies and not devDependencies inside the package.json
yarn global add gulp
yarn
rake db:create
rake db:migrate
yarn start
yarn run server
gulp watch
rake test
TODO
Integration run on the development server. Moreover, before running dev fixtures are loaded.
gulp e2e
Using Multiple Buildpacks for an App
- API Caching
- Rate limiting and request throttling
- Frontend unit testing framework
- Iconfont & SVG automations
Special thanks to VigetLabs for the original idea
MIT