mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-02 09:00:34 +08:00
The docs were relying on the grunt/util module for getting version info but this was unreliable and full of custom regexes. This is moved into a new version-info module that makes much better use of the semver library.
18 lines
589 B
JavaScript
18 lines
589 B
JavaScript
var gruntUtils = require('../../../lib/grunt/utils');
|
|
var versionInfo = require('../../../lib/versions/version-info');
|
|
|
|
module.exports = {
|
|
name: 'git-data',
|
|
runBefore: ['loading-files'],
|
|
description: 'This processor adds information from the local git repository to the extraData injectable',
|
|
init: function(config, injectables) {
|
|
injectables.value('gitData', {
|
|
version: versionInfo.currentVersion,
|
|
versions: versionInfo.previousVersions,
|
|
info: versionInfo.gitRepoInfo
|
|
});
|
|
},
|
|
process: function(extraData, gitData) {
|
|
extraData.git = gitData;
|
|
}
|
|
}; |