Skip to content
This repository was archived by the owner on Aug 7, 2019. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion lib/commands/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ exports.usage = '\n' +
' and cannot request additional modules.\n' +
' -v, --verbose Increase log level to report all compiled modules\n' +
' --no-minify Do not minify concatenated file with UglifyJS.\n' +
' --no-loader Do not include a module loader (RequireJS/Almond) or\n' +
' jam package info. Allows compiling page specific\n' +
' modules to be used with common modules compiled with\n' +
' a loader and package info.\n' +
' --no-license Do not include license comments.';


Expand All @@ -83,6 +87,7 @@ exports.run = function (settings, _args) {
almond: {match: ['-a','--almond']},
verbose: {match: ['-v','--verbose']},
nominify: {match: ['--no-minify']},
noloader: {match: ['--no-loader']},
nolicense: {match: ['--no-license']}
});

Expand Down Expand Up @@ -174,7 +179,7 @@ exports.compile = function (opt, callback) {
}

var includes;
if (opt.almond) {
if (opt.almond || opt.noloader) {
includes = opt.includes;
}
else {
Expand All @@ -199,6 +204,10 @@ exports.compile = function (opt, callback) {
if (opt.nominify) {
config.optimize = 'none';
}
if (opt.noloader) {
delete config.name;
delete config.paths;
}
if (opt.nolicense) {
config.preserveLicenseComments = false;
}
Expand Down