mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
parent
a2678c51d2
commit
83b6eaed16
7 changed files with 1110 additions and 908 deletions
18
make.js
18
make.js
|
@ -112,6 +112,8 @@ target.generic = function() {
|
|||
]
|
||||
};
|
||||
builder.build(setup);
|
||||
|
||||
cleanupJSSource(GENERIC_DIR + '/web/viewer.js');
|
||||
};
|
||||
|
||||
//
|
||||
|
@ -297,7 +299,15 @@ target.bundle = function(args) {
|
|||
BUNDLE_BUILD: bundleBuild});
|
||||
};
|
||||
|
||||
function cleanupJSSource(file) {
|
||||
var content = cat(file);
|
||||
|
||||
// Strip out all the vim/license headers.
|
||||
var reg = /\n\/\* -\*- Mode(.|\n)*?Mozilla Foundation(.|\n)*?'use strict';/g;
|
||||
content = content.replace(reg, '');
|
||||
|
||||
content.to(file);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -404,6 +414,8 @@ target.firefox = function() {
|
|||
};
|
||||
builder.build(setup);
|
||||
|
||||
cleanupJSSource(FIREFOX_BUILD_CONTENT_DIR + '/web/viewer.js');
|
||||
|
||||
// Remove '.DS_Store' and other hidden files
|
||||
find(FIREFOX_BUILD_DIR).forEach(function(file) {
|
||||
if (file.match(/^\./))
|
||||
|
@ -512,6 +524,8 @@ target.mozcentral = function() {
|
|||
};
|
||||
builder.build(setup);
|
||||
|
||||
cleanupJSSource(MOZCENTRAL_CONTENT_DIR + '/web/viewer.js');
|
||||
|
||||
// Remove '.DS_Store' and other hidden files
|
||||
find(MOZCENTRAL_DIR).forEach(function(file) {
|
||||
if (file.match(/^\./))
|
||||
|
@ -579,6 +593,8 @@ target.b2g = function() {
|
|||
]
|
||||
};
|
||||
builder.build(setup);
|
||||
|
||||
cleanupJSSource(B2G_BUILD_CONTENT_DIR + '/web/viewer.js');
|
||||
};
|
||||
|
||||
//
|
||||
|
@ -622,6 +638,8 @@ target.chrome = function() {
|
|||
};
|
||||
builder.build(setup);
|
||||
|
||||
cleanupJSSource(CHROME_BUILD_CONTENT_DIR + '/web/viewer.js');
|
||||
|
||||
// Update the build version number
|
||||
sed('-i', /PDFJSSCRIPT_VERSION/, EXTENSION_VERSION,
|
||||
CHROME_BUILD_DIR + '/manifest.json');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue