0.2.2 • Published 1 year ago

postmon v0.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

postmon

An npm script that runs another script only if the contents of a directory have changed

Quickstart

Install to devDependencies

pnpm add -D https://github.com/binary64/postmon
# or if you like to wait some more, and you use yarn:
yarn add -D https://github.com/binary64/postmon
# or if you like to wait some more even, and you use npm:
npm i -D https://github.com/binary64/postmon

Add to your .gitignore

printf "\n.postmon-lock\n" > .gitignore

Add to your package.json > "scripts" > "post*" section

{
  "scripts": {
    "postinstall": "postmon --include \"src/**/*.ts\" echo \"Changes detected in your files\""
  }
}

Advanced Configuration

You can add a .postmon.yml file to your repo, which describes the graph of code generations to be run. To invoke using this file, simple call postmon with no arguments:

{
  "scripts": {
    "postinstall": "postmon"
  }
}

The format of .postmon.yml is as follows:

scripts:
  <name>:
    inputs:
      - <file glob>
    outputs:
      - <file glob>
    command: <shell command line>
  ...

And example can be found in examples/prisma-nexus/.postmon.yml.

Contributing

To install for development, check out this repo and do pnpm i && pnpm dev - then in another terminal you can repeatedly do a node dist/cli.mjs

0.2.1

1 year ago

0.2.2

1 year ago

0.2.0

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago