Skip to content

Instantly share code, notes, and snippets.

@schnittstabil
Last active August 29, 2015 14:15
Show Gist options
  • Save schnittstabil/d8f8dd6cd40fd030bc17 to your computer and use it in GitHub Desktop.
Save schnittstabil/d8f8dd6cd40fd030bc17 to your computer and use it in GitHub Desktop.
grunt-contrib-symlink overwrite test
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
symlink: {
options: {
overwrite: true,
},
overwrite: {
src: 'sources-new',
dest: 'build/symlinkToSource',
},
},
});
grunt.loadNpmTasks('grunt-contrib-symlink');
grunt.registerTask('overwrite', ['symlink:overwrite']);
};
{
"name": "grunt-contrib-symlink-overwrite-test",
"version": "1.0.0",
"description": "",
"author": {
"name": "Michael Mayer",
"email": "michael@schnittstabil.de"
},
"license": "MIT",
"main": "index.js",
"scripts": {
"clean": "rm -rf build sources-new sources-old",
"setup-test": "mkdir build sources-new sources-old && touch sources-old/a-file && ln -s ../sources-old build/symlinkToSource",
"check": "if [ -f sources-old/a-file ]; then echo success; else echo fail && false; fi;",
"test": " npm run clean && npm run setup-test && grunt overwrite && npm run check"
},
"devDependencies": {
"grunt": "^0.4.5",
"grunt-contrib-symlink": "^0.3.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment