Skip to content

Commit 76d877e

Browse files
committed
Strip out license for bundled version.
1 parent 332ae4c commit 76d877e

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

make.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,14 @@ target.bundle = function() {
214214
'pattern.js',
215215
'stream.js',
216216
'worker.js',
217-
'../external/jpgjs/jpg.js',
218217
'jpx.js',
219218
'jbig2.js',
220219
'bidi.js',
221220
'metadata.js'];
222221

222+
var EXT_SRC_FILES = [
223+
'../external/jpgjs/jpg.js'];
224+
223225
if (!test('-d', BUILD_DIR))
224226
mkdir(BUILD_DIR);
225227

@@ -230,6 +232,13 @@ target.bundle = function() {
230232

231233
crlfchecker.checkIfCrlfIsPresent(SRC_FILES);
232234

235+
// Strip out all the vim/license headers.
236+
var reg = /\n\/\* -\*- Mode(.|\n)*?Mozilla Foundation(.|\n)*?'use strict';/g;
237+
bundle = bundle.replace(reg, '');
238+
239+
// Append external files last since we don't want to modify them.
240+
bundle += cat(EXT_SRC_FILES);
241+
233242
// This just preprocesses the empty pdf.js file, we don't actually want to
234243
// preprocess everything yet since other build targets use this file.
235244
builder.preprocess('pdf.js', ROOT_DIR + BUILD_TARGET,

src/api.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* limitations under the License.
1616
*/
1717

18+
'use strict';
19+
1820
/**
1921
* This is the main entry point for loading a PDF and interacting with it.
2022
* NOTE: If a URL is used to fetch the PDF data a standard XMLHttpRequest(XHR)

0 commit comments

Comments
 (0)