File tree Expand file tree Collapse file tree 5 files changed +35
-15
lines changed Expand file tree Collapse file tree 5 files changed +35
-15
lines changed Original file line number Diff line number Diff line change 1919say "Add build:css script"
2020build_script = "sass ./app/assets/stylesheets/application.bootstrap.scss:./app/assets/builds/application.css --no-source-map --load-path=node_modules"
2121
22- if ( `npx -v` . to_f < 7.1 rescue "Missing" )
23- say %(Add "scripts": { "build:css": "#{ build_script } " } to your package.json) , :red
24- else
22+ case `npx -v` . to_f
23+ when 7.1 ...8.0
2524 run %(npm set-script build:css "#{ build_script } ")
2625 run %(yarn build:css)
26+ when ( 8.0 ..)
27+ run %(npm pkg set scripts.build:css="#{ build_script } ")
28+ run %(yarn build:css)
29+ else
30+ say %(Add "scripts": { "build:css": "#{ build_script } " } to your package.json) , :green
2731end
Original file line number Diff line number Diff line change 66say "Add build:css script"
77build_script = "sass ./app/assets/stylesheets/application.bulma.scss:./app/assets/builds/application.css --no-source-map --load-path=node_modules"
88
9- if ( `npx -v` . to_f < 7.1 rescue "Missing" )
10- say %(Add "scripts": { "build:css": "#{ build_script } " } to your package.json) , :red
11- else
9+ case `npx -v` . to_f
10+ when 7.1 ...8.0
1211 run %(npm set-script build:css "#{ build_script } ")
1312 run %(yarn build:css)
13+ when ( 8.0 ..)
14+ run %(npm pkg set scripts.build:css="#{ build_script } ")
15+ run %(yarn build:css)
16+ else
17+ say %(Add "scripts": { "build:css": "#{ build_script } " } to your package.json) , :green
1418end
Original file line number Diff line number Diff line change 66say "Add build:css script"
77build_script = "postcss ./app/assets/stylesheets/application.postcss.css -o ./app/assets/builds/application.css"
88
9- if ( `npx -v` . to_f < 7.1 rescue "Missing" )
10- say %(Add "scripts": { "build:css": "#{ build_script } " } to your package.json) , :red
11- else
9+ case `npx -v` . to_f
10+ when 7.1 ...8.0
1211 run %(npm set-script build:css "#{ build_script } ")
1312 run %(yarn build:css)
13+ when ( 8.0 ..)
14+ run %(npm pkg set scripts.build:css="#{ build_script } ")
15+ run %(yarn build:css)
16+ else
17+ say %(Add "scripts": { "build:css": "#{ build_script } " } to your package.json) , :green
1418end
Original file line number Diff line number Diff line change 55say "Add build:css script"
66build_script = "sass ./app/assets/stylesheets/application.sass.scss:./app/assets/builds/application.css --no-source-map --load-path=node_modules"
77
8- if ( `npx -v` . to_f < 7.1 rescue "Missing" )
9- say %(Add "scripts": { "build:css": "#{ build_script } " } to your package.json) , :red
10- else
8+ case `npx -v` . to_f
9+ when 7.1 ...8.0
1110 run %(npm set-script build:css "#{ build_script } ")
1211 run %(yarn build:css)
12+ when ( 8.0 ..)
13+ run %(npm pkg set scripts.build:css="#{ build_script } ")
14+ run %(yarn build:css)
15+ else
16+ say %(Add "scripts": { "build:css": "#{ build_script } " } to your package.json) , :green
1317end
Original file line number Diff line number Diff line change 66say "Add build:css script"
77build_script = "tailwindcss -i ./app/assets/stylesheets/application.tailwind.css -o ./app/assets/builds/application.css --minify"
88
9- if ( `npx -v` . to_f < 7.1 rescue "Missing" )
10- say %(Add "scripts": { "build:css": "#{ build_script } " } to your package.json) , :red
11- else
9+ case `npx -v` . to_f
10+ when 7.1 ...8.0
1211 run %(npm set-script build:css "#{ build_script } ")
1312 run %(yarn build:css)
13+ when ( 8.0 ..)
14+ run %(npm pkg set scripts.build:css="#{ build_script } ")
15+ run %(yarn build:css)
16+ else
17+ say %(Add "scripts": { "build:css": "#{ build_script } " } to your package.json) , :green
1418end
You can’t perform that action at this time.
0 commit comments