5.77.2 • Published 5 years ago

mindmint-common v5.77.2

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
5 years ago

mindmint-common

Common algorithms and vue components. May be used on android, ios, web, and server.

Dev

  • Please write tests for any algorithms. Try to keep them as pure functions if possible.
  • Please write unit tests for vue components. Use tests to document the API and behavior.
  • Leave vue components, sass, and other assets precompiled. Allow the consuming project to handle compilation.

Use Branches for Feature Development

// create branch on mindmint-common
git checkout master
git pull
git status // make sure everything is clean... maybe run mocha here as well to make sure the tests pass
git checkout -b [your-feature-branch]
npm i

// create branch on mindmint-share or mindmint-eventpanner
git checkout master
git pull
git status // make sure everything is clean... maybe run mocha here as well to make sure the tests pass
git checkout -b [your-feature-branch]
npm i

// change package.json version to your branch
// "mindmint-common": "git+https://gitlab+deploy-token-9382:HWrfBRewrGcoaLjP8nKK@gitlab.com/MindMint/mindmint-common.git#[your-feature-branch]"

This will let you develop and integration test your changes. When you're ready to make a merge request, just leave the package.json referencing your branch - the merge reviewer will be responsible for changing this to a tagged version of common: see next section for details.

Merge Reviewer Will Tag Common

The merge reviewer should start with any pull requests that have been submitted to the common project.

Any number of merge requests can be merged in, and when that's done, a new version of mindmint-common should be tagged:

// in mindmint-common
git checkout master
git pull
// change version in package.json to the new value, then...
git add .
git commit
git tag -a v5.68.3 // or whatever the new version you want to tag is... you can't use this one, it already exists :)
git push && git push --tags

Tagging should always happen off the master branch. This avoids cases where tags include some features but not others. A ping-pong scenario can arise where some tags break your code and others work.

Merge Reviewer Will Reference New Tag

In mindmint-eventplanner and mindmint-share the merge reviewer will merge any number of requests. Then they should edit package.json to have the following line in dependencies:

"mindmint-common": "git+https://gitlab+deploy-token-9382:HWrfBRewrGcoaLjP8nKK@gitlab.com/MindMint/mindmint-common.git#v5.68.3"

Replace the tag at the end with the tag you just published for mindmint-common. Now run the following steps in your project:

npm i // this will generate package-lock.json
mocha // OR test your UI changes manually
git add [your changes... various ways to do this]
git commit
git push

All done merging! Now it's time to integration test and deploy the software!