Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.

Commit

Permalink
fix(Package): Use prepare instead of postinstall
Browse files Browse the repository at this point in the history
This avoid the following error when installing Thema in another package:

```bash
> @stencila/[email protected] postinstall /home/nokome/stencila/source/encoda/node_modules/@stencila/thema
> npm run update

> @stencila/[email protected] update /home/nokome/stencila/source/encoda/node_modules/@stencila/thema
> npm run update:selectors && npm run update:examples && npm run update:themes && npm run update:extensions

> @stencila/[email protected] update:selectors /home/nokome/stencila/source/encoda/node_modules/@stencila/thema
> ts-node --files src/scripts/selectors.ts

Error: Cannot find module '/home/nokome/stencila/source/encoda/node_modules/@stencila/thema/src/scripts/selectors.ts'
```

See https://docs.npmjs.com/misc/scripts
  • Loading branch information
nokome committed Feb 21, 2020
1 parent 24a96ee commit 1be7091
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
],
"main": "./dist/index.js",
"scripts": {
"postinstall": "npm run update",
"prepare": "npm run update",
"update": "npm run update:selectors && npm run update:examples && npm run update:themes && npm run update:extensions",
"update:selectors": "ts-node --files src/scripts/selectors.ts",
"update:examples": "ts-node --files src/scripts/examples.ts",
Expand Down

0 comments on commit 1be7091

Please sign in to comment.