Skip to content

Commit

Permalink
Update gulpfile.js to use in strict mode (#5478)
Browse files Browse the repository at this point in the history
  • Loading branch information
ksokolowski7 authored and simonbrunel committed May 9, 2018
1 parent 73b8cee commit 14399ff
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions gulpfile.js
Expand Up @@ -20,7 +20,7 @@ var yargs = require('yargs');
var path = require('path');
var fs = require('fs');
var htmllint = require('gulp-htmllint');
var package = require('./package.json');
var pkg = require('./package.json');

var argv = yargs
.option('force-output', {default: false})
Expand Down Expand Up @@ -69,11 +69,11 @@ gulp.task('default', ['build', 'watch']);
*/
function bowerTask() {
var json = JSON.stringify({
name: package.name,
description: package.description,
homepage: package.homepage,
license: package.license,
version: package.version,
name: pkg.name,
description: pkg.description,
homepage: pkg.homepage,
license: pkg.license,
version: pkg.version,
main: outDir + "Chart.js",
ignore: [
'.github',
Expand Down Expand Up @@ -112,11 +112,11 @@ function buildTask() {
.on('error', errorHandler)
.pipe(source('Chart.bundle.js'))
.pipe(insert.prepend(header))
.pipe(streamify(replace('{{ version }}', package.version)))
.pipe(streamify(replace('{{ version }}', pkg.version)))
.pipe(gulp.dest(outDir))
.pipe(streamify(uglify()))
.pipe(insert.prepend(header))
.pipe(streamify(replace('{{ version }}', package.version)))
.pipe(streamify(replace('{{ version }}', pkg.version)))
.pipe(streamify(concat('Chart.bundle.min.js')))
.pipe(gulp.dest(outDir));

Expand All @@ -127,11 +127,11 @@ function buildTask() {
.on('error', errorHandler)
.pipe(source('Chart.js'))
.pipe(insert.prepend(header))
.pipe(streamify(replace('{{ version }}', package.version)))
.pipe(streamify(replace('{{ version }}', pkg.version)))
.pipe(gulp.dest(outDir))
.pipe(streamify(uglify()))
.pipe(insert.prepend(header))
.pipe(streamify(replace('{{ version }}', package.version)))
.pipe(streamify(replace('{{ version }}', pkg.version)))
.pipe(streamify(concat('Chart.min.js')))
.pipe(gulp.dest(outDir));

Expand Down

0 comments on commit 14399ff

Please sign in to comment.