@tagmedev/tagme-models
v9.2.0
Published
Database models for all Tagme applications.
Readme
TagmeModels
This project centers the mongoose models used by Tagme Node.js projects and is a npm private package.
Usage
- Make sure the project has the
tagmedevnpm login token file.npmrcinside the project root folder (i.e. thepackage.jsoncontaining folder); - Include and install the
@tagmedev/tagme-modelsmodule as a project dependency (e.g.npm install @tagmedev/tagme-models --save); - Require the package on the script files as
require('@tagmedev/tagme-models').
- E.g.
var AppsModel = require('@tagmedev/tagme-models').Apps;
Updating
- Clone this GitHub repository;
- Update the code as needed and push all your modifications;
- When you're ready to publish the new version, run
npm version <patch|minor|major> -m '<message>'
- Use patch when you made backwards-compatible bug fixes;
- Use minor when you added functionality in a backwards-compatible manner;
- Use major when you make backwards-incompatible changes;
- On a branch other than master, you may also use prepatch, preminor or premajor to test new features;
- Write a summary message for this new version;
- Depending on the update type, npm will increase one of the version parts inside
package.jsonrespecting major.minor.patch, create a new commit and also tag this release.
- Push everything, including the tags:
git push origin <branch name> --tags; - Run
npm publish.
Creating a new package
- Create a new GitHub repository and clone it;
- Copy the npm login token file
.npmrcto the project root folder; - Run
npm initand follow the steps; - Code the project as needed:
- Suggestion: use an
index.jsfile to export all modules coded inside alibfolder.
- Commit and tag this release, e.g.:
git add -Agit commit -m 'Initial release';git tag v0.0.1;git push origin <branch name> --tags.
- Run
npm publish.
