GithubHelp home page GithubHelp logo

coderaiser / wisdom Goto Github PK

View Code? Open in Web Editor NEW
18.0 5.0 0.0 375 KB

:gift: Tool for publishing releases to github and npm

License: MIT License

JavaScript 100.00%
wisdom publish publishing npm release changelog

wisdom's Introduction

Wisdom License NPM version Build Status

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

image

๐ŸŽWisdom does next things:

  • set env variable $wisdom_version and $WISDOM_VERSION with future version
  • run command from scripts.wisdom of package.json (if exist);
  • run command from scripts.wisdom:type of package.json (if exist);
  • changelog;
  • version in package.json;
  • tag;
  • release on github;
  • push to github;
  • publish to npm;
  • run command from scripts.wisdom:done of package.json (if exist);

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

wisdom's People

Contributors

coderaiser avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.