krimzen-ninja-npm-module-template

0.0.7 • Public • Published

npm-module-template

Template project for building KrimzenNinja npm modules

Prerequisites

Install Chandler to sync your CHANGELOG.md entries to GitHub

Getting Started

Delete this from the readme once you have setup your project.

  1. Copy this template.
  2. In the package.json file update the following fields:
    1. name
    2. description
    3. repository.url
    4. keywords
    5. bugs.url
    6. homepage
    7. license if private then UNLICENSED
  3. In the CHANGELOG.md file, update the path to unreleased.
  4. Replace the README.md file.
  5. Make sure the included LICENSE file is appropriate. if private then delete the file.
  6. In the .circleci/config.yml file:
    1. Update the working_directory field.
    2. If this is a private package then after npm publish . add --access restricted
  7. Add the project to CircleCi if it is not picked up automatically
  8. Add the $NPM_TOKEN environment variable

API

See details

How to publish to NPM

You can either do releases from the master branch or follow the LTS model and branch off when you do a release.

  1. Ensure you are on the branch you want to publish from.
  2. Decide based on what is going into the release how the version number is going to change, see Semantic Versioning for more info.
  3. The CHANGELOG.md file should have pending changes documented in the Unreleased section, create a new heading for this version and cut the relevant changes and paste them into the new section.
  4. Commit the changes to the CHANGELOG.md file.
  5. Run one of the prebuilt publish commands that matches your semver patch, minor, major

    npm run patch -m "A message that makes sense" If none of the prebuilt ones fit, you can use npm version [major | minor | patch | premajor | preminor | prepatch | prerelease] -m "A message that makes sense"

  6. If you didn't publish from master, make sure to merge back into master if you were fixing a bug or the changes released need to go back to master.

TODO

  1. Make a Yeoman generator to do all the steps.
  2. Add snyk &| nsp
  3. Update CI step to push coverage to codecov or coveralls
  4. Badges in the README.md

License

MIT © Ryan Kotzen

Readme

Keywords

Package Sidebar

Install

npm i krimzen-ninja-npm-module-template

Weekly Downloads

0

Version

0.0.7

License

MIT

Last publish

Collaborators

  • exigentcoder