mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Removes builder.build().
This commit is contained in:
parent
9276d1dcd9
commit
140dd0f15b
2 changed files with 3 additions and 68 deletions
41
external/builder/builder.js
vendored
41
external/builder/builder.js
vendored
|
@ -265,47 +265,6 @@ function preprocessCSS(mode, source, destination) {
|
|||
}
|
||||
exports.preprocessCSS = preprocessCSS;
|
||||
|
||||
/**
|
||||
* Simplifies common build steps.
|
||||
* @param {object} setup
|
||||
* .defines defines for preprocessors
|
||||
* .copy array of arrays of source and destination pairs of files to copy
|
||||
* .preprocess array of arrays of source and destination pairs of files
|
||||
* run through preprocessor.
|
||||
*/
|
||||
function build(setup) {
|
||||
var defines = setup.defines;
|
||||
|
||||
setup.copy.forEach(function(option) {
|
||||
var source = option[0];
|
||||
var destination = option[1];
|
||||
cp('-R', source, destination);
|
||||
});
|
||||
|
||||
setup.preprocess.forEach(function(option) {
|
||||
var sources = option[0];
|
||||
var destination = option[1];
|
||||
|
||||
sources = ls('-R', sources);
|
||||
sources.forEach(function(source) {
|
||||
// ??? Warn if the source is wildcard and dest is file?
|
||||
var destWithFolder = destination;
|
||||
if (test('-d', destination)) {
|
||||
destWithFolder += '/' + path.basename(source);
|
||||
}
|
||||
preprocess(source, destWithFolder, defines);
|
||||
});
|
||||
});
|
||||
|
||||
(setup.preprocessCSS || []).forEach(function(option) {
|
||||
var mode = option[0];
|
||||
var source = option[1];
|
||||
var destination = option[2];
|
||||
preprocessCSS(mode, source, destination);
|
||||
});
|
||||
}
|
||||
exports.build = build;
|
||||
|
||||
/**
|
||||
* Merge two defines arrays. Values in the second param will override values in
|
||||
* the first.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue