mirror of
https://github.com/wassname/CanvasTextWrapper.git
synced 2026-08-18 11:40:34 +08:00
v0.1.0
This commit is contained in:
+34
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* grunt
|
||||
* http://gruntjs.com/
|
||||
*
|
||||
* Copyright (c) 2014 "Cowboy" Ben Alman
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = function(grunt) {
|
||||
|
||||
// Run sub-grunt files, because right now, testing tasks is a pain.
|
||||
grunt.registerMultiTask('subgrunt', 'Run a sub-gruntfile.', function() {
|
||||
var path = require('path');
|
||||
grunt.util.async.forEachSeries(this.filesSrc, function(gruntfile, next) {
|
||||
grunt.log.write('Loading ' + gruntfile + '...');
|
||||
grunt.util.spawn({
|
||||
grunt: true,
|
||||
args: ['--gruntfile', path.resolve(gruntfile)],
|
||||
}, function(error, result) {
|
||||
if (error) {
|
||||
grunt.log.error().error(result.stdout).writeln();
|
||||
next(new Error('Error running sub-gruntfile "' + gruntfile + '".'));
|
||||
} else {
|
||||
grunt.log.ok().verbose.ok(result.stdout);
|
||||
next();
|
||||
}
|
||||
});
|
||||
}, this.async());
|
||||
});
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user