PDFjs now compatible with Librejs

This commit is contained in:
Soumya Himanish Mohapatra 2017-12-16 11:01:43 +05:30
parent 6bbe91079b
commit 95ad956f68
2 changed files with 27 additions and 4 deletions

View File

@ -127,7 +127,8 @@ function createWebpackConfig(defines, output) {
BUNDLE_VERSION: versionInfo.version,
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 &&
!bundleDefines.CHROME;
var skipBabel = bundleDefines.SKIP_BABEL ||
@ -136,7 +137,7 @@ function createWebpackConfig(defines, output) {
return {
output: output,
plugins: [
new webpack2.BannerPlugin({ banner: licenseHeader, raw: true, }),
new webpack2.BannerPlugin({ banner: licenseHeaderLibre, raw: true, }),
],
resolve: {
alias: {
@ -995,7 +996,7 @@ gulp.task('lib', ['buildnumber'], function () {
content = content.replace(removeCjsSrc, function (all, prefix, suffix) {
return prefix + suffix;
});
return licenseHeader + content;
return licenseHeaderLibre + content;
}
var babel = require('babel-core');
var versionInfo = getVersionJSON();
@ -1012,7 +1013,8 @@ gulp.task('lib', ['buildnumber'], function () {
'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 buildLib = merge([
gulp.src([

View 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
*/