-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Nix yarn binstub * Set a yarn version to readme * Use yarn run
- Loading branch information
1 parent
2440970
commit c07bc8e
Showing
11 changed files
with
20 additions
and
40 deletions.
There are no files selected for viewing
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
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
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
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
This file was deleted.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,13 +11,7 @@ | |
directory "#{__dir__}/javascript", "#{Webpacker::Configuration.source}" | ||
|
||
puts "Copying binstubs" | ||
template "#{__dir__}/bin/webpack-dev-server", "bin/webpack-dev-server" | ||
template "#{__dir__}/bin/webpack", "bin/webpack" | ||
|
||
if !File.exist?("bin/yarn") | ||
puts "Copying yarn" | ||
template "#{__dir__}/bin/yarn", "bin/yarn" | ||
end | ||
directory "#{__dir__}/bin", "bin" | ||
|
||
chmod "bin", 0755 & ~File.umask, verbose: false | ||
|
||
|
@@ -29,13 +23,13 @@ | |
end | ||
|
||
puts "Installing all JavaScript dependencies" | ||
run "#{RbConfig.ruby} ./bin/yarn add webpack webpack-merge js-yaml path-complete-extname " \ | ||
run "yarn add webpack webpack-merge js-yaml path-complete-extname " \ | ||
"webpack-manifest-plugin [email protected] coffee-loader coffee-script " \ | ||
"babel-core babel-preset-env compression-webpack-plugin rails-erb-loader glob " \ | ||
"extract-text-webpack-plugin node-sass file-loader sass-loader css-loader style-loader " \ | ||
"postcss-loader autoprefixer postcss-smart-import precss" | ||
|
||
puts "Installing dev server for live reloading" | ||
run "#{RbConfig.ruby} ./bin/yarn add --dev webpack-dev-server" | ||
run "yarn add --dev webpack-dev-server" | ||
|
||
puts "Webpacker successfully installed 🎉 🍰" |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
namespace :webpacker do | ||
desc "Support for older Rails versions.Install all JavaScript dependencies as specified via Yarn" | ||
task :yarn_install do | ||
system("./bin/yarn") | ||
task :yarn_install, [:arg1, :arg2] do |task, args| | ||
exec "yarn #{args[:arg1]} #{args[:arg2]}" | ||
end | ||
end |
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