Created
November 15, 2022 16:08
-
-
Save sergejbog/943c00d1011d92bd1281fb5a886e7338 to your computer and use it in GitHub Desktop.
Making an NPM typescript package #typescript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm i typescript -D | |
npx tsc --init --rootDir src --outDir lib --sourceMap --declaration --declarationMap | |
# when you finish it | |
# you declare the name in package.json | |
npm publish |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"main": "lib", | |
"types": "lib", | |
"scripts": { | |
"build": "tsc" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment