Skip to content

Commit

Permalink
fix(bower): Use right angular version spec
Browse files Browse the repository at this point in the history
Also include full list of "release" files in "main" specification in
bower.json
  • Loading branch information
c0bra committed Nov 5, 2014
1 parent 78583df commit 6bd917a
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions lib/grunt/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,18 +297,29 @@ module.exports = function(grunt) {
// done();
// });
// });


// Create the bower.json file
grunt.registerTask('update-bower-json', function () {
var currentTag = semver.clean( util.getCurrentTag() );
var jsonFile = path.resolve(process.cwd()) + '/dist/release/' + currentTag + '/bower.json';

var taggedReleaseDir = path.join(path.resolve(process.cwd()), 'dist', 'release', currentTag);

// Get the list of files from the release directory
var releaseFiles = fs.readdirSync(taggedReleaseDir)
// Filter out minified files and the bower.json file, if it's there already
.filter(function (f) { return !/\.min\./.test(f) && !/^bower\.json$/.test(f); })
// Preprend "./" to each file path
.map(function (f) { return './' + f; });

var jsonFile = path.join(taggedReleaseDir, 'bower.json');

var json = {
"name": "angular-ui-grid",
"version": currentTag,
"main": "./ui-grid.js",
"main": releaseFiles,
"ignore": [],
"dependencies": {
"angular": ">= 1.2.16"
"angular": "~1.2.16"
},
"homepage": "http://ui-grid.info"
};
Expand Down

0 comments on commit 6bd917a

Please sign in to comment.