Giter Club home page Giter Club logo

git-semver-tags-info's Introduction

以反向时间顺序获取存储库的所有git semver标记,修改自“git-semver-tags”,在此基础上增加格式化日期,且转为es6标准

Install

$ npm install --save git-semver-tags-info

Usage

var gitSemverTagsInfo = require('git-semver-tags-info', [options]);

gitSemverTagsInfo(function(err, tags) {
  console.log(tags);
  //=>   [{ isTag: true, tag: '0.1.2', date: '2018-08-26 15:53:32' },  { isTag: true, tag: '0.1.1', date: '2018-08-26 23:27:05' },{ isTag: false,  tag: 'commit 9cfaa8afbd77d8a09bf6c99381009d1650ac5047',  date: '2018-08-23 21:09:48' }]
});
$ npm install --global git-semver-tags-info
$ git-semver-tags-info
  [{ isTag: true, tag: '0.1.2', date: '2018-08-26 15:53:32' },
  { isTag: true, tag: '0.1.1', date: '2018-08-26 23:27:05' },
  { isTag: false,
    tag: 'commit 9cfaa8afbd77d8a09bf6c99381009d1650ac5047',
    date: '2018-08-23 21:09:48' } ]

Options

  • opts.lernaTags: extract lerna style tags ([email protected]) from the git history, rather than v1.0.0 format.
  • opts.package: what package should lerna style tags be listed for, e.g., foo-package.
  • opts.tagPrefix: specify a prefix for the git tag to be ignored from the semver checks

License

BSD © golddream-y

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.