Rakefile in smooth-2.0.1 vs Rakefile in smooth-2.0.2
- old
+ new
@@ -1,6 +1,8 @@
require "bundler/gem_tasks"
+require 'pry'
+require 'pathname'
#!/usr/bin/env rake
begin
require 'bundler/setup'
rescue LoadError
@@ -20,5 +22,19 @@
desc "Run all specs in spec directory (excluding plugin specs)"
RSpec::Core::RakeTask.new(:spec => 'app:db:test:prepare')
task :default => :spec
+
+namespace :build do
+ desc "Take the webpack assets and put them in the asset pipeline"
+
+ task :webpack do
+ root = Pathname(File.dirname(__FILE__))
+ file = root.join("developer-tools","dist","client.js")
+ cwd = Dir.getwd()
+ Dir.chdir(cwd + '/developer-tools')
+ %x{webpack}
+ Dir.chdir(cwd)
+ FileUtils.cp(file, root.join("app","assets","javascripts","smooth","index.js"))
+ end
+end