Skip to content

Commit 269288f

Browse files
authored
Update scripts for use dynamically build folders (#23)
2 parents 4e795d0 + 99df8ce commit 269288f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
"type": "module",
66
"private": true,
77
"scripts": {
8-
"build": "npm run build:client && npm run build:server && npm run build:assets",
8+
"build": "mkdir -p ${DIST_DIR:-dist} && npm run build:client && npm run build:server && npm run build:assets",
99
"build:watch": "webpack --watch",
10-
"build:client": "webpack --config webpack.config.cjs",
11-
"build:server": "esbuild src/render.js --loader:.js=jsx --loader:.pcss=empty --bundle --minify --format=esm --outfile=dist/render.js",
12-
"build:assets": "rm -rf dist/static dist/index.html && cp -r src/index.html src/static dist/"
10+
"build:client": "webpack --config webpack.config.cjs --output-path ${DIST_DIR:-dist}",
11+
"build:server": "esbuild src/render.js --loader:.js=jsx --loader:.pcss=empty --bundle --minify --format=esm --outfile=${DIST_DIR:-dist}/render.js",
12+
"build:assets": "rm -rf ${DIST_DIR:-dist}/static ${DIST_DIR:-dist}/index.html && cp -r src/index.html src/static ${DIST_DIR:-dist}/"
1313
},
1414
"author": "Applura, Inc",
1515
"license": "MIT",

0 commit comments

Comments
 (0)