From 05d21fb249c01620d502d597742a2667a82ddb9f Mon Sep 17 00:00:00 2001 From: DamianEdwards Date: Wed, 21 May 2014 22:42:34 -0700 Subject: [PATCH] Removing grunt tasks as they'll come from core tasks --- makefile.shade | 77 +------------------------------------------------- 1 file changed, 1 insertion(+), 76 deletions(-) diff --git a/makefile.shade b/makefile.shade index 912f2497c7..cae07ce477 100644 --- a/makefile.shade +++ b/makefile.shade @@ -5,79 +5,4 @@ var FULL_VERSION='0.1' var AUTHORS='Microsoft' use-standard-lifecycle -k-standard-goals - -#install-node - var binDir = '${Path.Combine(Directory.GetCurrentDirectory(), "bin")}' - var nodeDir = '${Path.Combine(binDir, "node")}' - - -// Check if node is already installed locally - var nodeVer = '0.10.28' - var nodeMsi = 'node-v${nodeVer}-x86.msi' - var nodeUrl = 'http://nodejs.org/dist/v${nodeVer}/${nodeMsi}' - var nodeMsiPath = '${Path.Combine(binDir, nodeMsi)}' - var nodeInstalled = '${Directory.Exists(nodeDir)}' - @{ - Directory.CreateDirectory(nodeDir); - if (!nodeInstalled) { - // Download node installer msi - var wc = new WebClient(); - wc.DownloadFile(nodeUrl, nodeMsiPath); - } - } - - -// Extract it to local dir using msiexec: - exec program='msiexec' commandline='/a ${nodeMsiPath} /qb TARGETDIR=${nodeDir}' if='!nodeInstalled' - -#restore-npm-modules .install-node - var currentDir = '${Directory.GetCurrentDirectory()}' - var npmCmd = '${Path.Combine(currentDir, "bin", "node", "nodejs", "npm.cmd")}' - var sep = '${Path.DirectorySeparatorChar}' - @{ - // Find all dirs that contain a package.json file that aren't installed node modules - var npmDirs = Directory.GetFiles(currentDir, "package.json", SearchOption.AllDirectories) - .Where(p => p.IndexOf(sep + "node_modules" + sep) < 0 && - p.IndexOf(sep + "bower_components" + sep) < 0) - .Select(p => Path.GetDirectoryName(p)) - .Distinct(); - } - - exec program='${npmCmd}' commandline='install' workingdir='${dir}' each='var dir in npmDirs' - -#restore-bower-components .install-node - var currentDir = '${Directory.GetCurrentDirectory()}' - var nodeDir = '${Path.Combine(currentDir, "bin", "node", "nodejs")}' - var nodeExe = '${Path.Combine(nodeDir, "node.exe")}' - var npmCmd = '${Path.Combine(nodeDir, "npm.cmd")}' - var bowerInstalled = '${Directory.Exists(Path.Combine(nodeDir, "node_modules", "bower"))}' - var sep = '${Path.DirectorySeparatorChar}' - @{ - // Find all dirs that contain a bower.json file - var bowerDirs = Directory.GetFiles(currentDir, "bower.json", SearchOption.AllDirectories) - .Where(p => p.IndexOf(sep + "node_modules" + sep) < 0 && - p.IndexOf(sep + "bower_components" + sep) < 0) - .Select(p => Path.GetDirectoryName(p)) - .Distinct(); - } - - exec program='${npmCmd}' commandline='install --prefix ${nodeDir} bower' workingdir='${currentDir}' if='!bowerInstalled' - exec program='${nodeExe}' commandline='${Path.Combine(nodeDir, "node_modules", "bower", "bin", "bower")} install' workingdir='${dir}' each='var dir in bowerDirs' - -#run-grunt .restore-npm-modules .restore-bower-components target='compile' - var currentDir = '${Directory.GetCurrentDirectory()}' - var nodeDir = '${Path.Combine(currentDir, "bin", "node", "nodejs")}' - var nodeExe = '${Path.Combine(nodeDir, "node.exe")}' - var npmCmd = '${Path.Combine(nodeDir, "npm.cmd")}' - var gruntCliInstalled = '${Directory.Exists(Path.Combine(nodeDir, "node_modules", "grunt-cli"))}' - var sep = '${Path.DirectorySeparatorChar}' - @{ - // Find all dirs that contain a gruntfile.js file - var gruntDirs = Directory.GetFiles(currentDir, "gruntfile.js", SearchOption.AllDirectories) - .Where(p => p.IndexOf(sep + "node_modules" + sep) < 0 && - p.IndexOf(sep + "bower_components" + sep) < 0) - .Select(p => Path.GetDirectoryName(p)) - .Distinct(); - } - - exec program='${npmCmd}' commandline='install --prefix ${nodeDir} grunt-cli' workingdir='${currentDir}' if='!gruntCliInstalled' - exec program='${nodeExe}' commandline='${Path.Combine(nodeDir, "node_modules", "grunt-cli", "bin", "grunt")}' workingdir='${dir}' each='var dir in gruntDirs' \ No newline at end of file +k-standard-goals \ No newline at end of file