Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 4b12eb9

Browse files
committed
chore(grunt): add angular-ui-publisher
1 parent f3cc408 commit 4b12eb9

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
bower_components/
22
node_modules/
33
coverage/
4-
dist/
4+
dist/
5+
out/

gruntFile.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,26 @@ module.exports = function(grunt) {
99
grunt.registerTask('dist', ['ngmin', 'uglify']);
1010

1111

12+
// HACK TO ACCESS TO THE COMPONENT PUBLISHER
13+
function fakeTargetTask(prefix){
14+
return function(){
15+
16+
if (this.args.length !== 1) return grunt.log.fail('Just give the name of the ' + prefix + ' you want like :\ngrunt ' + prefix + ':bower');
17+
18+
var done = this.async();
19+
var spawn = require('child_process').spawn;
20+
spawn('./node_modules/.bin/gulp', [ prefix, '--branch='+this.args[0] ].concat(grunt.option.flags()), {
21+
cwd : './node_modules/angular-ui-publisher',
22+
stdio: 'inherit'
23+
}).on('close', done);
24+
};
25+
}
26+
27+
grunt.registerTask('build', fakeTargetTask('build'));
28+
grunt.registerTask('publish', fakeTargetTask('publish'));
29+
//
30+
31+
1232
// HACK TO MAKE TRAVIS WORK
1333
var testConfig = function(configFile, customOptions) {
1434
var options = { configFile: configFile, singleRun: true };

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
"author": "https://github.com/angular-ui/ui-sortable/graphs/contributors",
66
"license": "MIT",
77
"homepage": "http://angular-ui.github.com",
8-
"main": "./src/sortable.js",
8+
"main": "./sortable.js",
99
"dependencies": {},
1010
"devDependencies": {
11+
"angular-ui-publisher": "1.x",
1112
"grunt": "~0.4.x",
1213
"grunt-contrib-jshint": "0.8.x",
1314
"grunt-contrib-uglify": "0.2.x",

0 commit comments

Comments
 (0)