build.sh 392 B

12345678910111213141516171819
  1. #!/bin/bash
  2. # set current working directory to directory of the shell script
  3. cd "$(dirname "$0")"
  4. # before
  5. npm install
  6. mkdir -p tmp
  7. # remark.min.js
  8. npx rollup --config rollup.mjs --input remark.mjs --file tmp/remark.js
  9. npx terser --compress --mangle -- tmp/remark.js > tmp/remark.min.js
  10. # copy
  11. cp tmp/remark.min.js ../../vendor/
  12. # after
  13. rm -r tmp/
  14. rm -rf node_modules/ package-lock.json