From 915a73779789a56bbe9380a64cd3334919bb153e Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 24 Jun 2013 14:56:02 -0700 Subject: [PATCH] Don't copy git-utils/oniguruma deps/ during build These contain source files used to build the native modules and are not needed in the binary distribution. --- Gruntfile.coffee | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 16382e15f..7dece08ff 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -149,7 +149,14 @@ module.exports = (grunt) -> catch e directories.push(directory) - cp directory, path.join(APP_DIR, directory) for directory in directories + ignoredPaths = [ + path.join('git-utils', 'deps') + path.join('oniguruma', 'deps') + ] + ignoredPaths = ignoredPaths.map (ignoredPath) -> "(#{ignoredPath})" + nodeModulesFilter = new RegExp(ignoredPaths.join('|')) + for directory in directories + cp directory, path.join(APP_DIR, directory), filter: nodeModulesFilter cp 'src', path.join(APP_DIR, 'src'), filter: /.+\.(cson|coffee|less)$/ cp 'static', path.join(APP_DIR, 'static'), filter: /.+\.less$/