npm pre/post scripts

npm scripts で pre/post script を設定できるの知らなんだ。

Pre & Post Scripts

To create “pre” or “post” scripts for any scripts defined in the “scripts” section of the package.json, simply create another script with a matching name and add “pre” or “post” to the beginning of them.

  "scripts": {
    "precompress": "{ executes BEFORE the `compress` script }",
    "compress": "{ run command to compress files }",
    "postcompress": "{ executes AFTER `compress` script }"

A brief history of numerical systems