Skip to content

Instantly share code, notes, and snippets.

@danbee
Created November 30, 2016 17:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danbee/2572d7d0459ec99a5e3f6188a3ab0983 to your computer and use it in GitHub Desktop.
Save danbee/2572d7d0459ec99a5e3f6188a3ab0983 to your computer and use it in GitHub Desktop.
Webpack build with RSpec
# 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"
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