19 lines
1.2 KiB
Plaintext
19 lines
1.2 KiB
Plaintext
default currentDir = '${Directory.GetCurrentDirectory()}'
|
|
default nodeDir = '${Path.Combine(currentDir, "bin", "nodejs")}'
|
|
var bowerLibrary = '${ Path.Combine(nodeDir, "node_modules", "bower", "bin", "bower") }'
|
|
var bowerInstalled = '${ File.Exists(bowerLibrary) }'
|
|
|
|
default bowerGloballyInstalled = '${ !bowerInstalled && TestCommand("bower", "--version --config.interactive=false") }'
|
|
var bowerCmd = '${ bowerGloballyInstalled ? "bower" : bowerLibrary }'
|
|
|
|
- // Turn off Bower's Insight reporting since this usage is scripted.
|
|
- bowerCommand = bowerCommand + " --config.interactive=false";
|
|
|
|
- // Install bower locally if not already installed either globally or locally; creates bowerLibrary file if run
|
|
var installCommand = 'install ${E("KOREBUILD_NPM_INSTALL_OPTIONS")} --prefix "${nodeDir}" bower'
|
|
npm npmCommand='${installCommand}' if='!(bowerGloballyInstalled || bowerInstalled)' once='installBower'
|
|
|
|
- // Run bower
|
|
exec program='cmd' commandline='/C ${bowerCmd} ${bowerCommand}' workingdir='${bowerDir}' if='bowerGloballyInstalled && !IsLinux'
|
|
exec program='${bowerCmd}' commandline='${bowerCommand}' workingdir='${bowerDir}' if='bowerGloballyInstalled && IsLinux'
|
|
node nodeCommand='"${bowerCmd}" ${bowerCommand}' workingdir='${bowerDir}' if='!bowerGloballyInstalled' |