Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1 from jbghoul/uglify-ascii-option
Browse files Browse the repository at this point in the history
Uglify ascii option
  • Loading branch information
jbghoul authored Sep 19, 2022
2 parents 230d095 + d0757f4 commit 427747a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,23 @@ gulp.task('build', () => {
return merge(gpu, gpuCore);
});

const uglifyOptions = {
output: {
ascii_only: true,
}
}

/// Minify the build script, after building it
gulp.task('minify', () => {
const gpu = gulp.src('dist/gpu-browser.js')
.pipe(uglify())
.pipe(uglify(uglifyOptions))
.pipe(rename('gpu-browser.min.js'))
.pipe(header(fs.readFileSync('./src/browser-header.txt', 'utf8'), { pkg : pkg }))
.pipe(gulp.dest('./dist'))
.on('error', console.error);

const gpuCore = gulp.src('dist/gpu-browser-core.js')
.pipe(uglify())
.pipe(uglify(uglifyOptions))
.pipe(rename('gpu-browser-core.min.js'))
.pipe(header(fs.readFileSync('./src/browser-header.txt', 'utf8'), { pkg : pkg }))
.pipe(gulp.dest('./dist'))
Expand Down

0 comments on commit 427747a

Please sign in to comment.