macOS
brew install yarn
Ubuntu
# Configure apt
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install yarn
Make sure you have a supported node version. Install the latest version
sudo npm cache clean
sudo npm install -g n
sudo n stable
$ yarn init
yarn init v1.3.2
question name (cheidelacoriera):
question version (1.0.0):
question description:
question entry point (index.js):
question repository url ([email protected]:mberlanda/cheidelacoriera.git):
question author (Mauro Berlanda <[email protected]>):
question license (MIT):
question private:
success Saved package.json
Done in 27.43s.
yarn add jquery
yarn add jquery-ujs
yarn add bootstrap@3
yarn add waypoints
Add a new buildpack:
heroku buildpacks:set heroku/ruby
heroku buildpacks:add --index 1 heroku/nodejs
It could be a good idea to add later jshint. For now I will just add the config files and use it as a global package:
.jshintignore
: files to ignore.jshintrc
: general configuration
sudo npm install -g jshint
jshint *
bundle exec rake assets:precompile RAILS_ENV=production RAILS_SERVE_STATIC_FILES=enable SECRET_KEY_BASE=$(bundle exec rake secret) NODE_ENV=production
bin/rails g react:component ReservationForm schema:object formData:object uiSchema:object maxFans:integer