File tree Expand file tree Collapse file tree 3 files changed +21
-3
lines changed
Expand file tree Collapse file tree 3 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 22run "yarn add esbuild"
33
44say "Add build script"
5- run %(npm set-script build "esbuild app/javascript/*.* --bundle --outdir=app/assets/builds")
5+ build_script = "esbuild app/javascript/*.* --bundle --outdir=app/assets/builds"
6+
7+ if ( `npx -v` . to_f < 7.1 rescue "Missing" )
8+ say %(Add "scripts": { "build": "#{ build_script } " to your package.json) , :green
9+ else
10+ run %(npm set-script build "#{ build_script } ")
11+ end
Original file line number Diff line number Diff line change 33run "yarn add rollup @rollup/plugin-node-resolve"
44
55say "Add build script"
6- run %(npm set-script build "rollup -c rollup.config.js")
6+ build_script = "rollup -c rollup.config.js"
7+
8+ if ( `npx -v` . to_f < 7.1 rescue "Missing" )
9+ say %(Add "scripts": { "build": "#{ build_script } " to your package.json) , :green
10+ else
11+ run %(npm set-script build "#{ build_script } ")
12+ end
Original file line number Diff line number Diff line change 33run "yarn add webpack webpack-cli"
44
55say "Add build script"
6- run %(npm set-script build "webpack --config webpack.config.js")
6+ build_script = "webpack --config webpack.config.js"
7+
8+ if ( `npx -v` . to_f < 7.1 rescue "Missing" )
9+ say %(Add "scripts": { "build": "#{ build_script } " to your package.json) , :green
10+ else
11+ run %(npm set-script build "#{ build_script } ")
12+ end
You can’t perform that action at this time.
0 commit comments