This is sample typescript library project which can be used base project to build a typescript library.
- Clone this repository by running following command. Here we are target folder as lamda. You can change the name if you wish to do so.
git clone https://github.com/CodeSnooker/ts-library.git lamda
- We need to change the origin url. We can do so by running following command. Replace the git url with your own repository.
git remote set-url origin https://github.com/USERNAME/REPOSITORY.git
-
Make sure to update the URL in package.json file also.
-
Now run
npm install
-
Now you can place your code in
lib
folder -
Write some test and place your test file in _tests_ folder
-
run
npm run test
to test your project. -
run
npm run test:cover
to check code coverage -
Connect your repositories with Travis-Cli and Coveralls
-
Commit your code
-
run
npm version patch
to push your code along with release tag on the github server. -
Don't forget to update README.md for you library.
-
To publish your library, login to npm.
-
run
npm publish