2021-06-29 23:23:05 +00:00
|
|
|
all:
|
|
|
|
-mkdir -p out
|
2021-06-29 23:38:44 +00:00
|
|
|
cp index.html out/
|
2021-06-29 23:23:05 +00:00
|
|
|
cp -r node_modules/remixicon/fonts/remixicon.css node_modules/remixicon/fonts/remixicon.woff2 out/
|
|
|
|
npx esbuild --bundle base.css --outfile=out/bundle.css --external:remixicon.css --minify
|
2021-06-29 23:38:44 +00:00
|
|
|
npx uncss index.html --stylesheets out/bundle.css > out/_bundle.css
|
2021-06-29 23:23:05 +00:00
|
|
|
mv out/_bundle.css out/bundle.css
|
2021-06-29 23:38:44 +00:00
|
|
|
npx uncss index.html --stylesheets out/remixicon.css > out/_remixicon.css
|
2021-06-29 23:23:05 +00:00
|
|
|
mv out/_remixicon.css out/remixicon.css
|
|
|
|
npx esbuild --bundle ts/main.ts --outfile=out/main.js --minify
|
|
|
|
cp ../static/* out/
|
|
|
|
|
|
|
|
debug:
|
|
|
|
-mkdir -p out
|
2021-06-29 23:38:44 +00:00
|
|
|
cp index.html out/
|
2021-06-29 23:23:05 +00:00
|
|
|
cp -r node_modules/remixicon/fonts/remixicon.css node_modules/remixicon/fonts/remixicon.woff2 out/
|
|
|
|
npx esbuild --bundle base.css --outfile=out/bundle.css --external:remixicon.css --minify
|
|
|
|
npx esbuild --bundle ts/main.ts --sourcemap --outfile=out/main.js --minify
|
|
|
|
cp ../static/* out/
|
|
|
|
|
|
|
|
monitor:
|
|
|
|
npx live-server --watch=out --open=out/index.html &
|
|
|
|
npx nodemon -e html,css,ts -i out --exec "make debug"
|