Simple typescript app with jest to create a npm library with types
npx degit https://github.com/TheSmartMonkey/create-typescript-npm-library app
-
Install nodejs : https://nodejs.org/en/
-
Install node_modules with
npm install
-
Available commands with
npm run
(npm start
runs your code frommain.ts
)
To run the tests for your library, use the following command:
npm run test
This will execute all test files using Jest.
To publish your library to npm, use the following command:
npm run pub
Ensure you have updated the version in package.json
and are logged into npm.
| .eslintrc.json
| .gitignore
| .prettierignore
| .prettierrc.json
| jest.config.ts
| LICENSE
| main.ts
| package-lock.json
| package.json
| README.md
| tsconfig.json
|
+---debug
+---main.ts
+---package-lock.json
+---package.json
|
+---src
| +---functions
hello.test.ts
hello.ts
+---libs
.gitkeep
+---models
hello.model.ts