Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gulpfile.js to use in strict mode #5478

Merged
merged 1 commit into from May 9, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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