ifc-data-manipulation
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

NPM


npm adduser

npm version

npm publish

npm run build
npm run lint
npm run format

Notes

Setup package.json


# only file in /lib are included in npm package
  "files": [
    "lib/**/*" 
  ]

Scripts

prepare will run both BEFORE the package is packed and published, and on local npm install. Perfect for running building the code. Add this script to package.json


"prepare" : "npm run build"

prepublishOnly will run BEFORE prepare and ONLY on npm publish. Here we will run our test and lint to make sure we don’t publish bad code:


"prepublishOnly" : "npm test && npm run lint"

preversion will run before bumping a new package version. To be extra sure that we’re not bumping a version with bad code, why not run lint here as well? 😃


"preversion" : "npm run lint"

Version will run after a new version has been bumped. If your package has a git repository, like in our case, a commit and a new version-tag will be made every time you bump a new version. This command will run BEFORE the commit is made. One idea is to run the formatter here and so no ugly code will pass into the new version:


"version" : "npm run format && git add -A src"

Postversion will run after the commit has been made. A perfect place for pushing the commit as well as the tag.


"postversion" : "git push && git push --tags"

Bumping a new version


npm version patch

Our preversion, version, and postversion will run, create a new tag in git and push it to our remote repository. Now publish again:


npm publish

Links

Building and publishing an NPM Typescript package

Readme

Keywords

Package Sidebar

Install

npm i ifc-data-manipulation

Weekly Downloads

0

Version

1.0.5

License

MIT

Unpacked Size

101 kB

Total Files

225

Last publish

Collaborators

  • nguyen-manh-hoang