Skip to content

Commit 80d3e5e

Browse files
committed
Support yarn as alternative to npm
1 parent 7804b0f commit 80d3e5e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

ext/sass/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
/node_modules/
99
/protoc.exe
1010
/ruby/
11+
/yarn.lock

ext/sass/Rakefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ end
1010

1111
CLEAN.include %w[protoc.exe ruby *.proto *.tar.gz *.zip]
1212

13-
CLOBBER.include %w[dart-sass cli.rb embedded_sass_pb.rb node_modules package-lock.json]
13+
CLOBBER.include %w[dart-sass cli.rb embedded_sass_pb.rb node_modules package-lock.json yarn.lock]
1414

1515
file 'protoc.exe' do |t|
1616
fetch(ENV.fetch('PROTOC_BIN') { SassConfig.default_protoc }, t.name)
@@ -30,6 +30,8 @@ rescue StandardError
3030
end
3131

3232
file 'node_modules/sass' do
33+
sh 'yarn', 'install'
34+
rescue RuntimeError
3335
sh 'npm', 'install'
3436
end
3537

0 commit comments

Comments
 (0)