Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dynamically generate build version and embed in application
- Loading branch information
1 parent
1d2c3ee
commit bb65921
Showing
3 changed files
with
27 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module.exports = function(grunt) { | ||
'use strict'; | ||
|
||
// Thanks AngularJS https://github.com/angular/angular.js/blob/v1.2.16/lib/grunt/plugins.js#L66 | ||
grunt.registerMultiTask('filegen', 'Create a file with contents', function() { | ||
var content = this.options().content; | ||
|
||
this.files.forEach(function(file) { | ||
grunt.log.ok('File: ' + file.dest); | ||
grunt.file.write(file.dest, content); | ||
}); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters