Merge pull request #9093 from Snuffleupagus/rm-web-compatibility

[api-major] Stop bundling, and also remove, the `web/compatibility.js` file in pdfjs-dist
This commit is contained in:
Tim van der Meij 2017-11-01 22:48:34 +01:00 committed by GitHub
commit 97f1152d1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 33 deletions

View File

@ -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))

View File

@ -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');