CHANGELOG 中文文档教程

发布于 7年前 浏览 27 项目主页 更新于 3年前

changelog NPM versionBuild Status

命令行工具(和 Node 模块)为 npmjs.org 注册表以及任何公共 github.com 存储库中的模块生成颜色输出、markdown 或 json 的更改日志。

changelog

Command-line Usage

Node Modules in NPM

不需要安装模块来生成更新日志,但它们必须在 package.json 中定义它们的 repository url

Example using Express

$ changelog {npm module name} [release] [options]

npm module:模块名称,例如如 expressnpmgrunt

Any Public Github.com Repository

。Changelog 也适用于任何公共 Github 存储库。

$ changelog {Github.com repo} [options]

Github.com repo url:Urls可以是任何格式,比如https://github.com/dylang/changelog或者git@github.com:dylang /changelog.git 或者甚至只是 dylang/changelog

Help

changelog --help

Usage:
  changelog <npm module name> [versions] [options]
  changelog <github repo url> [versions] [options]

Module name:
   $ changelog npm

Github repo:
   $ changelog github.com/isaacs/npm
   $ changelog isaacs/npm

Versions:
   latest   Default: Show only the latest versions. ex: $ changelog npm latest
   all      Show all versions.                      ex: $ changelog npm all
   number   Show that many recent versions.         ex: $ changelog npm 3
   n.n.n    Show changes for a specific version.    ex: $ changelog npm 1.3.11

Options:
  -c, --color            Output as Color (terminal default)
  -m, --markdown         Output as Github-flavored Markdown (file default)
  -j, --json             Output as JSON
  -d, --debug            Enable debugging
  -h, --help             Display help and usage details

More Examples

Changelog API

Changelog 可以很容易地集成到其他工具中。

`changelog.generate(name, versions)

  • name string, required NPM module name from registry.
  • versions integer or semver, optional Number of versions, or the semver version to show.
var changelog = require('changelog');

changelog.generate(NpmPackageName, countOrVersions)
    .then(changelog.markdown);
var changelog = require('changelog');

changelog.generate('grunt')
    .then(showChanges);

function showChanges(data) {

    //With npm each "version" corresponds to all changes for that build pushed on npm
    //With github each "version" is one GMT day of changes
    data.versions.forEach(function(version) {
        console.log(version.version); //currently npm projects only
        console.log(version.date);    //JS Date

        //version.changes is an array of commit messages for that version
        version.changes.forEach(function(change) {
            console.log(' * ' + change);
        });
    });

    //Information about the project
    console.log(data.project);
}

How it works

  • Changelog uses npmjs.org API to get the list of versions and the publish dates.
  • It cross-references the versions in npm with the commit history from the Github's API.

Inspiration

Dylan Greene 构建这个是因为他总是很好奇在执行 npm update 时发生了什么变化。 此模块的名称灵感来自于在前往工作TheChangelog Podcast一个>。

About the Author

各位开发者好! 我的名字是 Dylan Greene。 什么时候 我并没有因为两个孩子而不知所措,我喜欢为开源社区做贡献。 我是 Opower 的技术主管。 我带领一个团队使用 Grunt 和 Angular 来构建软件 成功地帮助像我们这样的人使用更少的电力。 不久前,我与人共同创建了 Doodle or Die,这是一款拥有数百万玩家的搞笑网络游戏 为我们赢得“最有趣”类别的节点淘汰赛的涂鸦。 我是 Twitter 和其他地方的 dylang

我的一些其他 Node 项目:

NameDescriptionGithub StarsNpm Installs
grunt-notifyAutomatic desktop notifications for Grunt errors and warnings using Growl for OS X or Windows, Mountain Lion and Mavericks Notification Center, and Notify-Send.79836,294
grunt-promptInteractive prompt for your Grunt config using console checkboxes, text input with filtering, password fields.2445,804
shortidAmazingly short non-sequential url-friendly unique id generator.2628,357
rssRSS feed generator. A really simple API to add RSS feeds to any project.24315,147
npm-checkCheck for outdated, incorrect, and unused dependencies.New!1,164
xmlFast and simple xml generator. Supports attributes, CDATA, etc. Includes tests and examples.5621,139
loggingSuper sexy color console logging with cluster support.24541
grunt-attentionDisplay attention-grabbing messages in the terminalNew!6,253
observatoryBeautiful UI for showing tasks running on the command line.313,516
flowdock-refinedFlowdock desktop app custom UINew!59
anthologyModule information and stats for any @npmjs userNew!216
grunt-catEcho a file to the terminal. Works with text, figlets, ascii art, and full-color ansi.New!102

此列表是使用 anthology 生成的。

License

版权所有 (c) 2014 undefined,贡献者。

根据 MIT 许可证 发布。

屏幕截图是CC BY-SA (Attribution-ShareAlike)。


使用 grunt-readmegrunt-templates-dylang 2014 年 10 月 6 日星期一。 Bitdeli 徽章Google Analytics

changelog NPM versionBuild Status

Command line tool (and Node module) that generates a changelog in color output, markdown, or json for modules in npmjs.org's registry as well as any public github.com repo.

changelog

Command-line Usage

Node Modules in NPM

Modules do not need to be installed to generate changelog but they must define their repository url in their package.json.

Example using Express

$ changelog {npm module name} [release] [options]

npm module: The module name, such as express, npm, grunt, etc.

Any Public Github.com Repository

Changelog also works on any public Github repo.

$ changelog {Github.com repo} [options]

Github.com repo url: Urls can be any format, such as https://github.com/dylang/changelog or git@github.com:dylang/changelog.git or even just dylang/changelog.

Help

changelog --help

Usage:
  changelog <npm module name> [versions] [options]
  changelog <github repo url> [versions] [options]

Module name:
   $ changelog npm

Github repo:
   $ changelog github.com/isaacs/npm
   $ changelog isaacs/npm

Versions:
   latest   Default: Show only the latest versions. ex: $ changelog npm latest
   all      Show all versions.                      ex: $ changelog npm all
   number   Show that many recent versions.         ex: $ changelog npm 3
   n.n.n    Show changes for a specific version.    ex: $ changelog npm 1.3.11

Options:
  -c, --color            Output as Color (terminal default)
  -m, --markdown         Output as Github-flavored Markdown (file default)
  -j, --json             Output as JSON
  -d, --debug            Enable debugging
  -h, --help             Display help and usage details

More Examples

Changelog API

Changelog can be easily integrated into other tools.

`changelog.generate(name, versions)

  • name string, required NPM module name from registry.
  • versions integer or semver, optional Number of versions, or the semver version to show.
var changelog = require('changelog');

changelog.generate(NpmPackageName, countOrVersions)
    .then(changelog.markdown);
var changelog = require('changelog');

changelog.generate('grunt')
    .then(showChanges);

function showChanges(data) {

    //With npm each "version" corresponds to all changes for that build pushed on npm
    //With github each "version" is one GMT day of changes
    data.versions.forEach(function(version) {
        console.log(version.version); //currently npm projects only
        console.log(version.date);    //JS Date

        //version.changes is an array of commit messages for that version
        version.changes.forEach(function(change) {
            console.log(' * ' + change);
        });
    });

    //Information about the project
    console.log(data.project);
}

How it works

  • Changelog uses npmjs.org API to get the list of versions and the publish dates.
  • It cross-references the versions in npm with the commit history from the Github's API.

Inspiration

Dylan Greene built this because he was always curious what was changed when doing npm update. This module's name is inspired by listening to TheChangelog Podcast on the way to work.

About the Author

Hello fellow developer! My name is Dylan Greene. When not overwhelmed with my two kids I enjoy contributing to the open source community. I'm a tech lead at Opower. I lead a team using Grunt and Angular to build software that successfully helps people like us use less power. Not too long ago I co-created Doodle or Die, a hilarious web game with millions of doodles that won us Node Knockout for the "most fun" category. I'm dylang on Twitter and other places.

Some of my other Node projects:

NameDescriptionGithub StarsNpm Installs
grunt-notifyAutomatic desktop notifications for Grunt errors and warnings using Growl for OS X or Windows, Mountain Lion and Mavericks Notification Center, and Notify-Send.79836,294
grunt-promptInteractive prompt for your Grunt config using console checkboxes, text input with filtering, password fields.2445,804
shortidAmazingly short non-sequential url-friendly unique id generator.2628,357
rssRSS feed generator. A really simple API to add RSS feeds to any project.24315,147
npm-checkCheck for outdated, incorrect, and unused dependencies.New!1,164
xmlFast and simple xml generator. Supports attributes, CDATA, etc. Includes tests and examples.5621,139
loggingSuper sexy color console logging with cluster support.24541
grunt-attentionDisplay attention-grabbing messages in the terminalNew!6,253
observatoryBeautiful UI for showing tasks running on the command line.313,516
flowdock-refinedFlowdock desktop app custom UINew!59
anthologyModule information and stats for any @npmjs userNew!216
grunt-catEcho a file to the terminal. Works with text, figlets, ascii art, and full-color ansi.New!102

This list was generated using anthology.

License

Copyright (c) 2014 undefined, contributors.

Released under the MIT license.

Screenshots are CC BY-SA (Attribution-ShareAlike).


Generated using grunt-readme with grunt-templates-dylang on Monday, October 6, 2014. Bitdeli BadgeGoogle Analytics

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文