forked from aguacongas/chatle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_gulp.shade
16 lines (13 loc) · 1022 Bytes
/
_gulp.shade
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
default currentDir = '${Directory.GetCurrentDirectory()}'
default nodeDir = '${Path.Combine(currentDir, "bin", "nodejs")}'
var gulpLibrary = '${ Path.Combine(nodeDir, "node_modules", "gulp", "bin", "gulp") }'
var gulpInstalled = '${ File.Exists(gulpLibrary) }'
default gulpGloballyInstalled = '${ !gulpInstalled && TestCommand("gulp", "--version") }'
var gulpCmd = '${ gulpGloballyInstalled ? "gulp" : gulpLibrary }'
- // Install gulp locally if not already installed either globally or locally; creates gulpLibrary file if run
var installCommand = 'install ${E("KOREBUILD_NPM_INSTALL_OPTIONS")} --prefix "${nodeDir}" gulp'
npm npmCommand='${installCommand}' if='!(gulpGloballyInstalled || gulpInstalled)' once='installgulp'
-// Run gulp
exec program='cmd' commandline='/C ${gulpCmd}' workingdir='${gulpDir}' if='gulpGloballyInstalled && !IsLinux'
exec program='${gulpCmd}' workingdir='${gulpDir}' if='gulpGloballyInstalled && IsLinux'
node nodeCommand='"${gulpCmd}"' workingdir='${gulpDir}' if='!gulpGloballyInstalled'