Home

Awesome

Wisdom License NPM version Build Status

Tool for publishing releases to github and npm according to Semantic Versionin.

image

🎁Wisdom does next things:

package.json should contain next properties,

when publish enabled:

{
    "publishConfig": {
        "access": "public"
    }
}

when releases enabled:

repository field should be set:

{
    "repository": {
        "type": "git",
        "url": "git://github.com/coderaiser/wisdom.git"
    }
}

Before executing wisdom, wisdom:type and wisdom:done scripts will be expanded via redrun which will speed things up.

Here is list of commands that should be executed to get same result:

changelog {{ version }}
version {{ version }}
git add --all
git commit -m "feature(package) v{{ version }}"
git push origin {{ branch }}
git tag v{{ version }}
git push origin v{{ version }}
grizzly -tn "token from url" \
-r grizzly -o {{ owner }} -t {{ version }} \
-n "{{ repo }} {{ version }}" -b "changelog"
npm publish

Install

npm i wisdom -g

How to use?

$ wisdom
Usage: wisdom [patch|minor|major]
Options:
  --dry-run       show tasks to run without actually running
  --force         do not ask before publishin major
  -h, --help      display this help and exit
  -v, --version   output version information and exit

Configuration

When you need configure wisdom you could declare them in package.json (with defaults set):

{
    "changelog": true,
    "commitType": "colon|paren",
    "tag": true,
    "release": true,
    "releaseTriesCount": 10,
    "private": false,
    "branch": "master",
    "scripts": {
        "wisdom": "echo 'do something before starting'",
        "wisdom:type": "echo 'do something before starting and add --patch, --minor or --major argument'",
        "wisdom:build": "echo 'do something before publish'",
        "wisdom:done": "echo 'do something after publish'"
    }
}

License

MIT