This repository has been archived by the owner on May 13, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add bower.json and update Grunt tasks to update version number in all…
… *.json files.
- Loading branch information
Showing
4 changed files
with
37 additions
and
32 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 @@ | ||
{"name":"jQuery.superLabels","version":"2.0.4","description":"Give your forms a helping of awesome!","homepage":"http://remy.bach.me.uk/superlabels_demo/","bugs":"https://github.com/remybach/jQuery.superLabels/issues","repository":{"type":"git","url":"https://github.com/remybach/jQuery.superLabels"},"main":"jquery.superLabels.min.js","licenses":[{"type":"MIT"}]} |
This file was deleted.
Oops, something went wrong.
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,33 @@ | ||
module.exports = function(grunt) { | ||
'use strict'; | ||
|
||
grunt.registerTask('updateVersion', 'Update the version number in all relevant *.json files.', function() { | ||
var filename, | ||
files, | ||
json; | ||
|
||
grunt.config.requires('updateVersion.files'); | ||
|
||
files = grunt.config('updateVersion.files'); | ||
|
||
for (var i = files.length - 1; i >= 0; i--) { | ||
filename = files[i]; | ||
|
||
// Warn on and remove invalid source files (if nonull was set). | ||
if (!grunt.file.exists(filename)) { | ||
grunt.log.warn('Source file not found at "' + filename + '"'); | ||
return false; | ||
} | ||
|
||
grunt.log.writeln('Updating Banner for: '+filename); | ||
|
||
json = grunt.file.readJSON(filename); | ||
|
||
json.version = grunt.config('meta.version'); | ||
|
||
grunt.file.write(filename, JSON.stringify(json)); | ||
|
||
grunt.log.writeln('Done updating version in: '+filename); | ||
} | ||
}); | ||
}; |