[api-major] Stop bundling, and also remove, the web/compatibility.js
file in pdfjs-dist
As suggested in PR 8102.
This commit is contained in:
parent
b46443f0c1
commit
f0c98a7ab0
16
gulpfile.js
16
gulpfile.js
@ -296,20 +296,6 @@ function createComponentsBundle(defines) {
|
||||
.pipe(replaceJSRootName(componentsAMDName));
|
||||
}
|
||||
|
||||
function createCompatibilityBundle(defines) {
|
||||
var compatibilityAMDName = 'pdfjs-dist/web/compatibility';
|
||||
var compatibilityOutputName = 'compatibility.js';
|
||||
|
||||
var compatibilityFileConfig = createWebpackConfig(defines, {
|
||||
filename: compatibilityOutputName,
|
||||
library: compatibilityAMDName,
|
||||
libraryTarget: 'umd',
|
||||
umdNamedDefine: true,
|
||||
});
|
||||
return gulp.src('./web/compatibility.js')
|
||||
.pipe(webpack2Stream(compatibilityFileConfig));
|
||||
}
|
||||
|
||||
function checkFile(path) {
|
||||
try {
|
||||
var stat = fs.lstatSync(path);
|
||||
@ -642,7 +628,6 @@ gulp.task('components', ['buildnumber'], function () {
|
||||
|
||||
return merge([
|
||||
createComponentsBundle(defines).pipe(gulp.dest(COMPONENTS_DIR)),
|
||||
createCompatibilityBundle(defines).pipe(gulp.dest(COMPONENTS_DIR)),
|
||||
gulp.src(COMPONENTS_IMAGES).pipe(gulp.dest(COMPONENTS_DIR + 'images')),
|
||||
preprocessCSS('web/pdf_viewer.css', 'components', defines, true)
|
||||
.pipe(gulp.dest(COMPONENTS_DIR)),
|
||||
@ -1040,7 +1025,6 @@ gulp.task('lib', ['buildnumber'], function () {
|
||||
'web/*.js',
|
||||
'!web/pdfjs.js',
|
||||
'!web/viewer.js',
|
||||
'!web/compatibility.js',
|
||||
], { base: '.', }),
|
||||
gulp.src('test/unit/*.js', { base: '.', }),
|
||||
]).pipe(transform('utf8', preprocess))
|
||||
|
@ -1,17 +0,0 @@
|
||||
/* 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.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
require('../src/shared/compatibility.js');
|
Loading…
Reference in New Issue
Block a user