-
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.
* Check node and yarn before installing webpacker Verify node and yarn before running installer Take 2 Fix case Use a new puts Remove . * Change to Node.js
- Loading branch information
1 parent
92616e1
commit 36f1300
Showing
6 changed files
with
33 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
namespace :webpacker do | ||
desc "Verifies if Node.js is installed" | ||
task :check_node do | ||
begin | ||
node_version = `node -v` | ||
if node_version.tr("v", "").to_f < 6.4 | ||
puts "Webpacker requires Node.js >= 6.4 and you are using #{node_version}" | ||
puts "Please upgrade Node.js https://nodejs.org/en/download/" | ||
puts "Exiting!" && exit! | ||
end | ||
rescue Errno::ENOENT | ||
puts "Node.js not installed. Please download and install Node.js https://nodejs.org/en/download/" | ||
puts "Exiting!" && exit! | ||
end | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
namespace :webpacker do | ||
desc "Verifies if yarn is installed" | ||
task :check_yarn do | ||
begin | ||
`yarn --version` | ||
rescue Errno::ENOENT | ||
puts "Webpacker requires yarn. Please download and install Yarn https://yarnpkg.com/lang/en/docs/install/" | ||
puts "Exiting!" && exit! | ||
end | ||
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
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