Permalink
Browse files

ENYO-1189: merge ENYO-1259

- fix libraries deployment
- fix jshint complaints

Enyo-DCO-1.1-Signed-off-by: Francois-Xavier KOWALSKI <francois-xavier.kowalski@hp.com>
  • Loading branch information...
2 parents 9792d61 + ef54a05 commit 77748554fa0be5ccd9cd2fd8d092661a4c311b19 @asnowfix asnowfix committed Nov 15, 2012
Showing with 22 additions and 22 deletions.
  1. +22 −22 tools/deploy.js
View
@@ -80,18 +80,18 @@ var node = process.argv[0],
function printUsage() {
// format generated using node-optimist...
- console.log('\n'
- + 'Usage: ' + node + ' ' + deploy + ' [-c][-e enyo_dir][-b build_dir][-o out_dir][-p package_js][-s source_dir]\n'
- + '\n'
- + 'Options:\n'
- + ' -v verbose operation [boolean] [default: ' + verbose + ']\n'
- + ' -b alternate build directory [default: "' + buildDir + '"]\n'
- + ' -c do not run the LESS compiler [boolean] [default: ' + less + ']\n'
- + ' -e location of the enyo framework [default: "' + enyoDir + '"]\n'
- + ' -o alternate output directory [default: "' + outDir + '"]\n'
- + ' -p location of the main package.js file [default: "' + packageJs + '"]\n'
- + ' -s source code root directory [default: "' + sourceDir + '"]\n'
- + '\n');
+ console.log('\n' +
+ 'Usage: ' + node + ' ' + deploy + ' [-c][-e enyo_dir][-b build_dir][-o out_dir][-p package_js][-s source_dir]\n' +
+ '\n' +
+ 'Options:\n' +
+ ' -v verbose operation [boolean] [default: ' + verbose + ']\n' +
+ ' -b alternate build directory [default: "' + buildDir + '"]\n' +
+ ' -c do not run the LESS compiler [boolean] [default: ' + less + ']\n' +
+ ' -e location of the enyo framework [default: "' + enyoDir + '"]\n' +
+ ' -o alternate output directory [default: "' + outDir + '"]\n' +
+ ' -p location of the main package.js file [default: "' + packageJs + '"]\n' +
+ ' -s source code root directory [default: "' + sourceDir + '"]\n' +
+ '\n');
}
var opt = nopt(/*knownOpts*/ {
@@ -124,13 +124,13 @@ if (opt.help) {
buildDir = opt.build || buildDir;
enyoDir = opt.enyo || enyoDir;
outDir = opt.out || outDir;
-packageJs = opt.packagejs
- || (opt.source ? path.join(opt.source, 'package.js') : undefined)
- || packageJs;
-sourceDir = opt.source
- || (opt.packagejs ? path.dirname(opt.packagejs) : undefined)
- || sourceDir;
-less = !(opt.less === false) && less;
+packageJs = opt.packagejs ||
+ (opt.source ? path.join(opt.source, 'package.js') : undefined) ||
+ packageJs;
+sourceDir = opt.source ||
+ (opt.packagejs ? path.dirname(opt.packagejs) : undefined) ||
+ sourceDir;
+less = (opt.less !== false) && less;
verbose = opt.verbose;
var minifier = path.resolve(enyoDir, 'tools', 'minifier', 'minify.js');
@@ -194,7 +194,7 @@ if(shell.test('-d', assetsSrcDir)) {
var libSrcDir = path.join(sourceDir, 'lib');
if(shell.test('-d', libSrcDir)) {
- shell.ls(libSrcDir).forEach(deployLib(lib));
+ shell.ls(libSrcDir).forEach(deployLib);
}
function deployLib(lib) {
@@ -215,8 +215,8 @@ function deployLib(lib) {
if (!stat.isFile())
throw new Error("*** Not a file: '" + script + "'");
run([script, libOutdir]);
- } catch(e) {
- // no deploy.(js|bat|js): copy everything
+ } catch(e2) {
+ // no deploy.(js|bat|sh): copy everything
shell.cp('-r', path.join(sourceDir, 'lib', lib), path.join(outDir, 'lib'));
}
}

0 comments on commit 7774855

Please sign in to comment.