Rakefile in conjur-asset-ui-1.4.2 vs Rakefile in conjur-asset-ui-1.6.0

- old
+ new

@@ -1,10 +1,7 @@ require 'bundler/gem_tasks' -require 'jasmine' -load 'jasmine/tasks/jasmine.rake' - begin require 'cucumber' require 'cucumber/rake/task' Cucumber::Rake::Task.new(:features) do |t| @@ -22,50 +19,58 @@ abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin' end end namespace :deps do - desc 'Installs non-ruby dependencies like gulp, bower and nodejs packages' + desc 'Installs non-ruby dependencies like gulp and nodejs packages' task :install do - sh 'sudo npm install -g gulp bower' - sh 'npm install' - sh 'bower install' + Dir.chdir('app') do + sh 'npm install' + end end - desc 'Updates npm and bower packages' + desc 'Updates npm packages' task :update do - sh 'npm update' - sh 'bower update' + Dir.chdir('app') do + sh 'npm update' + end end - desc 'Removes npm and bower packages from filesystem' + desc 'Removes npm packages from filesystem' task :clean do - sh 'rm -rf node_modules' - sh 'rm -rf bower_components' + Dir.chdir('app') do + sh 'rm -rf node_modules' + end end end namespace :assets do desc 'Build js and css' task :build do - sh 'gulp build' + Dir.chdir('app') do + sh './node_modules/gulp/bin/gulp.js build' + end end desc 'Watch the assets files and rebuild when one of them changes' task :watch => :build do - sh 'gulp watch' + Dir.chdir('app') do + sh './node_modules/gulp/bin/gulp.js watch' + end end desc 'Clean builded assets' task :clean do - sh 'gulp clean' + Dir.chdir('app') do + sh './node_modules/gulp/bin/gulp.js clean' + end end end task :build => %w(deps:install assets:build) namespace :git do desc 'Executes git clean' task :clean do - sh 'git clean -dfX' + sh 'git clean -dfx' end end