Permalink
Browse files

wth - Use Yarn to manage our front-end assets

Yarn is now a part of the Rails default stack. We should use this package manager for our front-end assets like Bootstrap, jQuery, etc.

This is a first step, all new js/css libraries should be added via Yarn.

https://yarnpkg.com/en/
rails/rails#27300
http://weblog.rubyonrails.org/2016/12/10/this-week-in-rails-yarn-webpack-bigint-pks-and-more/
http://nithinbekal.com/posts/yarn-rails/

[#147836807]

Story - https://www.pivotaltracker.com/story/show/147836807
  • Loading branch information...
wtholt committed Feb 23, 2018
1 parent 138be83 commit 0f167758862a8cee3c1c97c76da4649bb01a661d
Showing with 9 additions and 0 deletions.
  1. +1 −0 config/initializers/assets.rb
  2. +8 −0 package.json
@@ -21,6 +21,7 @@
SparcRails::Application.config.assets.paths.unshift "#{Rails.root}/themes/assets/stylesheets"
SparcRails::Application.config.assets.paths.unshift "#{Rails.root}/themes/assets/images"
SparcRails::Application.config.assets.paths.unshift "#{Rails.root}/themes/assets/javascripts"
Rails.application.config.assets.paths << Rails.root.join('node_modules')
Rails.application.config.assets.precompile += %w( additional_details/application.css )
Rails.application.config.assets.precompile += %w( additional_details/application.js )
Rails.application.config.assets.precompile += %w( admin/application.css )
View
@@ -0,0 +1,8 @@
{
"name": "sparc-request",
"version": "1.0.0",
"main": "index.js",
"repository": "https://github.com/sparc-request/sparc-request.git",
"author": "William Holt <will.t.holt@gmail.com>",
"license": "MIT"
}

0 comments on commit 0f16775

Please sign in to comment.