Skip to content
/ ts-npm-package Public template

A template, with batteries included, to quickly develop node modules in typescript, which auto-publish to npm.

License

Notifications You must be signed in to change notification settings

jruipinto/ts-npm-package

Repository files navigation

-----------------------------------------------------

Welcome to ts-npm-package

Maintenance License: MIT

A template, with batteries included, to quickly develop node modules in typescript, which auto-publish to npm.

-----------------------------------------------------

Table of Contents

-----------------------------------------------------

Usage

Use this template to create your own node packages in typescript.

Follow these steps:

  1. Use this template

  2. Edit package.json

  3. Edit LICENSE (if MIT license is ok to you, just edit your name in license )

  4. Overwrite blueprint

    Readme is autogenerated, based on blueprint.md.

    Just replace ./blueprint.md by ./examples/blueprint.md and edit it to suit your needs.

    To know more about how blueprint works visit @appnest/readme and read the documentation.

  5. Install necessary dependencies

    npm install
  6. Generate new README, CONTRIBUTING, CHANGELOG and API docs from TSDoc comments

    npm run generate:all

    or if you want to generate each one individually:

    npm run generate:contributing
    npm run generate:changelog
    npm run generate:readme
    npm run generate:api-docs
  7. Create a NPM acount (if you haven't one already)

  8. Generate a NPM_TOKEN at your NPM account

  9. Add NPM_TOKEN to repo's SECRETS (inside settings tab)

After all these steps, every time you update the version inside package.json and commit to master branch, the new version will automatically be submited to NPM (if it passes all the tests)

What you should take in consideration using this template?

This template has batteries included and so you're covered by the following technologies:

  • Typescript - for better javascript
  • ESLint - for cleaner code and save you from errors, stylistic errors, bugs, etc...
  • Prettier - for formating your code so you can look more tidy :)
  • Mocha + Chai - for writing test for your code because you wan't to catch those bugs before users
  • IstambulJS - to check code's test coverage
  • Typedoc - to generate API docs so other developers understand your code too and use it
  • @appnest/readme - to generate readme based on your package.json + blueprint.md
  • conventional-changelog-cli - to generate changelog
  • weallcontribute - to generate contributing.md

-----------------------------------------------------

Changelog

Follow this link to check the Changelog

-----------------------------------------------------

Author

jruipinto

-----------------------------------------------------

Contributing

Contributions, issues and feature requests are welcome!

Feel free to check issues page. You can also take a look at the contributing guide.

-----------------------------------------------------

Show your support

Give a ⭐️ if this project helped you!

-----------------------------------------------------

License

Copyright © 2021 jruipinto.

This project is MIT licensed.

About

A template, with batteries included, to quickly develop node modules in typescript, which auto-publish to npm.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks