Created
November 30, 2016 17:05
-
-
Save danbee/2572d7d0459ec99a5e3f6188a3ab0983 to your computer and use it in GitHub Desktop.
Webpack build with RSpec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add your own tasks in files placed in lib/tasks ending in .rake, | |
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. | |
require_relative 'config/application' | |
Rails.application.load_tasks | |
task(:default).clear | |
# Run webpack:build before :spec | |
task default: ["webpack:build", :spec] | |
if defined? RSpec | |
task(:spec).clear | |
RSpec::Core::RakeTask.new(:spec) do |t| | |
t.verbose = false | |
end | |
end | |
task default: "bundler:audit" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :webpack do | |
desc "Build the asset bundle with Webpack" | |
task :build do | |
sh "yarn run build" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment