Created
October 25, 2013 18:29
-
-
Save felixzapata/7159513 to your computer and use it in GitHub Desktop.
tarea copiar dentro de Grunt
This file contains hidden or 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
/* | |
* grunt-copy-all-docs | |
* | |
*/ | |
'use strict'; | |
module.exports = function(grunt) { | |
var fs = require('fs'), | |
ncp = require('ncp').ncp, | |
path = require('path'); | |
// Please see the Grunt documentation for more information regarding task | |
// creation: http://gruntjs.com/creating-tasks | |
grunt.registerTask('copy_all_docs', 'Find and copy "Docs" directories.', function() { | |
var src = grunt.option('src'); | |
if (typeof src === 'undefined') { | |
grunt.fail.fatal('No source path'); | |
} else { | |
grunt.file.mkdir(path.normalize(path.join(__dirname, '../tasks2/docs/rp1'))); | |
ncp(path.normalize(__dirname + '/test/fixtures/repos/rp1/docs/*'), '../tasks2/docs/rp1', function(err) { | |
if (err) { | |
return console.error(err); | |
} | |
console.log('done!'); | |
}); | |
} | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment