1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

ESLint --fix

This commit is contained in:
Wojciech Maj 2018-12-06 13:55:15 +01:00
parent 80d7ff4912
commit ef1f255649
13 changed files with 47 additions and 47 deletions

View file

@ -9,7 +9,7 @@ var OUTPUT_PATH = '../../build/browserify';
var TMP_FILE_PREFIX = '../../build/browserify_';
gulp.task('build-bundle', function() {
return browserify('main.js', {output: TMP_FILE_PREFIX + 'main.tmp'})
return browserify('main.js', { output: TMP_FILE_PREFIX + 'main.tmp', })
.ignore(require.resolve('pdfjs-dist/build/pdf.worker')) // Reducing size
.bundle()
.pipe(source(TMP_FILE_PREFIX + 'main.tmp'))
@ -21,12 +21,12 @@ gulp.task('build-bundle', function() {
gulp.task('build-worker', function() {
// We can create our own viewer (see worker.js) or use already defined one.
var workerSrc = require.resolve('pdfjs-dist/build/pdf.worker.entry');
return browserify(workerSrc, {output: TMP_FILE_PREFIX + 'worker.tmp'})
return browserify(workerSrc, { output: TMP_FILE_PREFIX + 'worker.tmp', })
.bundle()
.pipe(source(TMP_FILE_PREFIX + 'worker.tmp'))
.pipe(streamify(uglify({compress:{
sequences: false // Chrome has issue with the generated code if true
}})))
.pipe(streamify(uglify({ compress: {
sequences: false, // Chrome has issue with the generated code if true
}, })))
.pipe(rename('pdf.worker.bundle.js'))
.pipe(gulp.dest(OUTPUT_PATH));
});