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 startruns your code frommain.ts)
To run the tests for your library, use the following command:
npm run testThis will execute all test files using Jest.
To publish your library to npm, use the following command:
npm run pubEnsure 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