Explicitly list the ignored files in the src/shared/ folder, for the gulp lib build target

To avoid having to manually update the "shared files" list in `gulpfile.js`, whenever any changes are made to the file structure in the `src/shared/` folder, let's simply list the files we do *not* want instead.
Given that the excluded files have been consistent ever since the `lib` build target was added, this patch should help avoid unnecessary churn in `gulpfile.js` in the future.
This commit is contained in:
Jonas Jenwald 2018-06-04 12:52:43 +02:00
parent 5053d02ba4
commit f486051d77

View File

@ -877,24 +877,16 @@ gulp.task('lib', ['buildnumber'], function () {
var licenseHeaderLibre =
fs.readFileSync('./src/license_header_libre.js').toString();
var preprocessor2 = require('./external/builder/preprocessor2.js');
var sharedFiles = [
'compatibility',
'global_scope',
'is_node',
'streams_polyfill',
'util',
];
var buildLib = merge([
gulp.src([
'src/{core,display}/*.js',
'src/shared/{' + sharedFiles.join() + '}.js',
'src/{core,display,shared}/*.js',
'!src/shared/{cffStandardStrings,fonts_utils}.js',
'src/{pdf,pdf.worker}.js',
], { base: 'src/', }),
gulp.src([
'examples/node/domstubs.js',
'web/*.js',
'!web/pdfjs.js',
'!web/viewer.js',
'!web/{pdfjs,viewer}.js',
], { base: '.', }),
gulp.src('test/unit/*.js', { base: '.', }),
]).pipe(transform('utf8', preprocess))