jgm / djot.js

JavaScript implementation of djot
MIT License
141 stars 15 forks source link

Add prepare and pretest scripts in package.json #81

Closed black-desk closed 6 months ago

black-desk commented 6 months ago

For use @djot/djot.js through git, we need a "prepare" scripts to run tsc and webpack.

https://docs.npmjs.com/cli/v9/using-npm/scripts#life-cycle-scripts

prepare (since npm@4.0.0)

  • NOTE: If a package being installed through git contains a prepare script, its dependencies and devDependencies will be installed, and the prepare script will be run, before the package is packaged and installed.

Signed-off-by: black-desk me@black-desk.cn

black-desk commented 6 months ago

prepare scripts allow other to use this package like this:

  "dependencies": {
    "@djot/djot": "git+https://github.com/jgm/djot.js",
   }

which means that we can now use the unreleased version of djot.js in other node pacakge.