Skip to content

Instantly share code, notes, and snippets.

@ben-ng
Last active December 18, 2015 22:19
Show Gist options
  • Save ben-ng/5854095 to your computer and use it in GitHub Desktop.
Save ben-ng/5854095 to your computer and use it in GitHub Desktop.
var build = path.relative(__dirname, '_shared')
, src = path.relative(__dirname, '_shared_sources')
, buildLessFile = path.join(build, 'css', 'styles.css')
, lessFiles = [
"css/video-js.css"
, "css/elastislide.css"
, "css/jquery.fancybox.css"
, "css/jquery.fancybox-buttons.css"
, "css/jquery.fancybox-thumbs.css"
, "css/bootstrap.css"
, "css/bootstrap-responsive.css"
, "less/flat-ui.less"
, "css/qunit.css"
, "css/guiders.css"
];
lessFiles = _.map(lessFiles, function (filePath) {
return path.join(src,filePath);
});
desc('Compiles CSS and LESS');
file(buildLessFile, lessFiles, function () {
console.log("Target: " + buildLessFile);
console.log("Sources:");
console.log(lessFiles);
console.log(success(' LESS Built (' + lessFiles.length + ' files) ') + info(buildLessFile));
});
jake _shared/css/styles.css --trace
Target: _shared/css/styles.css
Sources:
[ '_shared_sources/css/video-js.css',
'_shared_sources/css/elastislide.css',
'_shared_sources/css/jquery.fancybox.css',
'_shared_sources/css/jquery.fancybox-buttons.css',
'_shared_sources/css/jquery.fancybox-thumbs.css',
'_shared_sources/css/bootstrap.css',
'_shared_sources/css/bootstrap-responsive.css',
'_shared_sources/less/flat-ui.less',
'_shared_sources/css/qunit.css',
'_shared_sources/css/guiders.css' ]
LESS Built (10 files) _shared/css/styles.css
jake aborted.
Error: ENOENT, no such file or directory '_shared/css/styles.css'
at Object.fs.statSync (fs.js:684:18)
at FileBase.updateModTime (/usr/local/share/npm/lib/node_modules/jake/lib/task/file_task.js:81:20)
at FileBase.complete (/usr/local/share/npm/lib/node_modules/jake/lib/task/file_task.js:87:12)
at api.complete (/usr/local/share/npm/lib/node_modules/jake/lib/api.js:182:15)
at TaskBase.run (/usr/local/share/npm/lib/node_modules/jake/lib/task/task.js:228:7)
at TaskBase.handlePrereqComplete (/usr/local/share/npm/lib/node_modules/jake/lib/task/task.js:204:12)
at null.<anonymous> (/usr/local/share/npm/lib/node_modules/jake/lib/task/task.js:173:16)
at g (events.js:175:14)
at EventEmitter.emit (events.js:92:17)
at FileBase.complete (/usr/local/share/npm/lib/node_modules/jake/lib/task/file_task.js:91:10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment