From c4e5f84e8b4974bf4dcab8be9be1b30733f68206 Mon Sep 17 00:00:00 2001 From: Vit Brunner Date: Tue, 11 Nov 2014 23:42:51 +0100 Subject: [PATCH] Grunt copy with smartness --- Gruntfile.coffee | 49 ++++++++++++++++++++---------------------------- 1 file changed, 20 insertions(+), 29 deletions(-) diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 8102b8c..05f4654 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -129,35 +129,6 @@ module.exports = (grunt) -> } } - copy: { - main: { - expand: true - cwd: 'source' - src: [ '.htaccess', 'tests/the_raven/*' ] - dest: 'build' - options: { - processContent: (content) -> - grunt.template.process content, { data: template_data } - } - } - min: { - expand: true - cwd: 'source' - src: [ '.htaccess', 'tests/the_raven/*' ] - dest: 'build-min' - options: { - processContent: (content) -> - grunt.template.process content, { data: template_data } - } - } - min_fonts: { - expand: true - cwd: 'build/bower_components/fontawesome/fonts' - src: '*' - dest: 'build-min/fonts/' - } - } - cssmin: { min: { files: { @@ -211,6 +182,26 @@ module.exports = (grunt) -> params , {}) + grunt.config 'copy', add([ + [ 'main', { + src: [ '.htaccess', 'tests/the_raven/*' ] + }] + [ 'min', { + src: [ '.htaccess', 'tests/the_raven/*' ] + }] + [ 'min_fonts', { + cwd: 'build/bower_components/fontawesome/fonts' + src: '*' + dest: 'build-min/fonts/' + options: {} + }] + ], { + options: { + processContent: (content) -> + grunt.template.process content, { data: template_data } + } + }) + grunt.config 'jade', add([ [ 'main', { options: { data: _.extend {}, vars, template_data