Skip to content

Instantly share code, notes, and snippets.

@cowboy
Last active December 12, 2015 09:59
Show Gist options
  • Save cowboy/4755642 to your computer and use it in GitHub Desktop.
Save cowboy/4755642 to your computer and use it in GitHub Desktop.
grunt 0.4.0: including dotfiles
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
test: {
non_expand: {
files: [
{src: '*', dest: 'build', dot: true},
]
},
expand: {
files: [
{expand: true, src: '*', dest: 'build', dot: true},
]
}
},
});
// Custom testing task.
grunt.registerMultiTask('test', function() {
this.files.forEach(function(f) {
console.log('%s -> %s', f.src.join(' '), f.dest);
});
});
};
$ grunt test
Running "test:non_expand" (test) task
.git .gitignore .travis.yml AUTHORS CONTRIBUTING.md Gruntfile.js LICENSE-MIT README.md custom-gruntfile.js docs lib node_modules npm-debug.log package.json test -> build
Running "test:expand" (test) task
.git -> build/.git
.gitignore -> build/.gitignore
.travis.yml -> build/.travis.yml
AUTHORS -> build/AUTHORS
CONTRIBUTING.md -> build/CONTRIBUTING.md
Gruntfile.js -> build/Gruntfile.js
LICENSE-MIT -> build/LICENSE-MIT
README.md -> build/README.md
custom-gruntfile.js -> build/custom-gruntfile.js
docs -> build/docs
lib -> build/lib
node_modules -> build/node_modules
npm-debug.log -> build/npm-debug.log
package.json -> build/package.json
test -> build/test
Done, without errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment