Skip to content

Commit

Permalink
Rake file for node_modules update.
Browse files Browse the repository at this point in the history
  • Loading branch information
xhagrg committed Apr 13, 2017
1 parent 9640a4f commit 7e3a19e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/tasks/node_components.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace :node_packages do
desc 'install packages'
task install: :environment do
Dir.chdir("#{Rails.root}/vendor") do
system('npm', 'install')
end
end

desc 'compile assets'
task compile: :environment do
Dir.chdir("#{Rails.root}/vendor") do
compile_strategy = 'start'
compile_strategy = 'start:prod' if Rails.env.production?
system('npm', compile_strategy)
end
end
end

0 comments on commit 7e3a19e

Please sign in to comment.