Skip to content

Commit

Permalink
Move type definition step into user defined script
Browse files Browse the repository at this point in the history
  • Loading branch information
roderickhsiao committed Mar 30, 2022
1 parent 59248f3 commit d4f428c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .scripts/user/prepublish.sh
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
# Use this file to your own code to run at NPM `prepublish` event.

echo ""
echo "=> Creating type definitions into dist/types ..."

yarn tsc --build tsconfig.publish.json

echo "=> Type definitions created."
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"lint": "eslint src",
"lintfix": "eslint src --fix",
"postpublish": "npm run publish-storybook",
"prepublish": ". ./.scripts/prepublish.sh && tsc --build tsconfig.publish.json",
"prepublish": ". ./.scripts/prepublish.sh",
"publish-storybook": "bash .scripts/publish_storybook.sh",
"storybook": "start-storybook -p 9010",
"test-watch": "npm run testonly -- --watch --watch-extensions js,ts",
Expand Down

0 comments on commit d4f428c

Please sign in to comment.