From ff63cb8b0d760d3306ba0259a522f0df87e29a08 Mon Sep 17 00:00:00 2001 From: damianedwards Date: Tue, 3 Feb 2015 17:17:41 -0800 Subject: [PATCH] Move grunt execution to before compilation --- build/_k-standard-goals.shade | 52 +++++++++++++++++------------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/build/_k-standard-goals.shade b/build/_k-standard-goals.shade index 870abea441..552ffd44fc 100644 --- a/build/_k-standard-goals.shade +++ b/build/_k-standard-goals.shade @@ -27,6 +27,32 @@ default Configuration='${E("Configuration")}' } } +#restore-npm-modules + -// Find all dirs that contain a package.json file + var npmDirs = '${GetDirectoriesContaining(Directory.GetCurrentDirectory(), "package.json")}' + npm npmCommand='install ${E("npm_install_options")}' each='var npmDir in npmDirs' + +#restore-bower-components + -// Find all dirs that contain a bower.json file + var bowerDirs = '${GetDirectoriesContaining(Directory.GetCurrentDirectory(), "bower.json")}' + bower each='var bowerDir in bowerDirs' bowerCommand='install ${E("bower_install_options")}' + +#run-grunt .restore-npm-modules .restore-bower-components target='initialize' + -// Find all dirs that contain a gruntfile.js file + var gruntDirs = '${GetDirectoriesContaining(Directory.GetCurrentDirectory(), "gruntfile.js")}' + grunt each='var gruntDir in gruntDirs' + @{ + if (!IsMono) + { + CallTarget("clean-npm-modules"); + } + } + +#clean-npm-modules if='!IsMono' + -// Find all dirs that contain a package.json file + var npmDirs = '${GetDirectoriesContaining(Directory.GetCurrentDirectory(), "package.json").Select(d => Path.Combine(d, "node_modules"))}' + robocopy-delete dir='${npmDir}' each='var npmDir in npmDirs' + #repo-initialize target='initialize' k-restore @@ -92,32 +118,6 @@ default Configuration='${E("Configuration")}' } } -#restore-npm-modules - -// Find all dirs that contain a package.json file - var npmDirs = '${GetDirectoriesContaining(Directory.GetCurrentDirectory(), "package.json")}' - npm npmCommand='install ${E("npm_install_options")}' each='var npmDir in npmDirs' - -#restore-bower-components - -// Find all dirs that contain a bower.json file - var bowerDirs = '${GetDirectoriesContaining(Directory.GetCurrentDirectory(), "bower.json")}' - bower each='var bowerDir in bowerDirs' bowerCommand='install ${E("bower_install_options")}' - -#run-grunt .restore-npm-modules .restore-bower-components target='compile' - -// Find all dirs that contain a gruntfile.js file - var gruntDirs = '${GetDirectoriesContaining(Directory.GetCurrentDirectory(), "gruntfile.js")}' - grunt each='var gruntDir in gruntDirs' - @{ - if (!IsMono) - { - CallTarget("clean-npm-modules"); - } - } - -#clean-npm-modules if='!IsMono' - -// Find all dirs that contain a package.json file - var npmDirs = '${GetDirectoriesContaining(Directory.GetCurrentDirectory(), "package.json").Select(d => Path.Combine(d, "node_modules"))}' - robocopy-delete dir='${npmDir}' each='var npmDir in npmDirs' - #--quiet @{ E("KPM_pack_options"," --quiet");