Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Yarn acts as the package manager for the javascript libraries.
- Instead of using gems for the corresponding js libraries yarn can be used.
- The advantages are many: (Pointing a couple)
- - we don't have to wait for a gem to be made for a js library
- - we don't have to wait for the gem to be updated when a new version of the library is released.
- Yarn adds the packages to the folder `node_modules`.
- So the assets path will have to be updated at
- `config/initializers/assets.rb`.
- The following line will have to be uncommented.
- `Rails.application.config.assets.paths << Rails.root.join('node_modules')`.
- Yarn creates a `yarn.lock` file to lock the versions.
- `yarn init` can be done to populate `package.json` ( Consider this similar to `Gemfile`, and `yarn.lock` to `Gemfile.lock`)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement