aboutsummaryrefslogtreecommitdiffstats
path: root/docs/config/processors/git-data.js
diff options
context:
space:
mode:
authorPeter Bacon Darwin2014-02-13 21:50:13 +0000
committerPeter Bacon Darwin2014-02-16 19:03:42 +0000
commit0b35521d8ffe9ff851c49801900381ec043962f0 (patch)
tree3143e1bfbc1c436b626f1dde408e1e6d9e985703 /docs/config/processors/git-data.js
parent4a938213dfc0ef1828ab795ba726c490b267db69 (diff)
downloadangular.js-0b35521d8ffe9ff851c49801900381ec043962f0.tar.bz2
chore(doc-gen): move git info into its own processor
Diffstat (limited to 'docs/config/processors/git-data.js')
-rw-r--r--docs/config/processors/git-data.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/config/processors/git-data.js b/docs/config/processors/git-data.js
new file mode 100644
index 00000000..229864bb
--- /dev/null
+++ b/docs/config/processors/git-data.js
@@ -0,0 +1,17 @@
+var gruntUtils = require('../../../lib/grunt/utils');
+
+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: gruntUtils.getVersion(),
+ versions: gruntUtils.getPreviousVersions(),
+ info: gruntUtils.getGitRepoInfo()
+ });
+ },
+ process: function(extraData, gitData) {
+ extraData.git = gitData;
+ }
+}; \ No newline at end of file