PDFjs now compatible with Librejs
This commit is contained in:
parent
6bbe91079b
commit
95ad956f68
10
gulpfile.js
10
gulpfile.js
@ -127,7 +127,8 @@ function createWebpackConfig(defines, output) {
|
|||||||
BUNDLE_VERSION: versionInfo.version,
|
BUNDLE_VERSION: versionInfo.version,
|
||||||
BUNDLE_BUILD: versionInfo.commit,
|
BUNDLE_BUILD: versionInfo.commit,
|
||||||
});
|
});
|
||||||
var licenseHeader = fs.readFileSync('./src/license_header.js').toString();
|
var licenseHeaderLibre =
|
||||||
|
fs.readFileSync('./src/license_header_libre.js').toString();
|
||||||
var enableSourceMaps = !bundleDefines.FIREFOX && !bundleDefines.MOZCENTRAL &&
|
var enableSourceMaps = !bundleDefines.FIREFOX && !bundleDefines.MOZCENTRAL &&
|
||||||
!bundleDefines.CHROME;
|
!bundleDefines.CHROME;
|
||||||
var skipBabel = bundleDefines.SKIP_BABEL ||
|
var skipBabel = bundleDefines.SKIP_BABEL ||
|
||||||
@ -136,7 +137,7 @@ function createWebpackConfig(defines, output) {
|
|||||||
return {
|
return {
|
||||||
output: output,
|
output: output,
|
||||||
plugins: [
|
plugins: [
|
||||||
new webpack2.BannerPlugin({ banner: licenseHeader, raw: true, }),
|
new webpack2.BannerPlugin({ banner: licenseHeaderLibre, raw: true, }),
|
||||||
],
|
],
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
@ -995,7 +996,7 @@ gulp.task('lib', ['buildnumber'], function () {
|
|||||||
content = content.replace(removeCjsSrc, function (all, prefix, suffix) {
|
content = content.replace(removeCjsSrc, function (all, prefix, suffix) {
|
||||||
return prefix + suffix;
|
return prefix + suffix;
|
||||||
});
|
});
|
||||||
return licenseHeader + content;
|
return licenseHeaderLibre + content;
|
||||||
}
|
}
|
||||||
var babel = require('babel-core');
|
var babel = require('babel-core');
|
||||||
var versionInfo = getVersionJSON();
|
var versionInfo = getVersionJSON();
|
||||||
@ -1012,7 +1013,8 @@ gulp.task('lib', ['buildnumber'], function () {
|
|||||||
'pdfjs-lib': '../pdf',
|
'pdfjs-lib': '../pdf',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
var licenseHeader = fs.readFileSync('./src/license_header.js').toString();
|
var licenseHeaderLibre =
|
||||||
|
fs.readFileSync('./src/license_header_libre.js').toString();
|
||||||
var preprocessor2 = require('./external/builder/preprocessor2.js');
|
var preprocessor2 = require('./external/builder/preprocessor2.js');
|
||||||
var buildLib = merge([
|
var buildLib = merge([
|
||||||
gulp.src([
|
gulp.src([
|
||||||
|
21
src/license_header_libre.js
Normal file
21
src/license_header_libre.js
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
/**
|
||||||
|
* @licstart The following is the entire license notice for the
|
||||||
|
* Javascript code in this page
|
||||||
|
*
|
||||||
|
* Copyright 2017 Mozilla Foundation
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
* @licend The above is the entire license notice for the
|
||||||
|
* Javascript code in this page
|
||||||
|
*/
|
Loading…
Reference in New Issue
Block a user