Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ var gulp = require('gulp'),
connect = require('gulp-connect'),
replace = require('gulp-replace'),
htmlv = require('gulp-html-validator'),
insert = require('gulp-insert'),
inquirer = require('inquirer'),
semver = require('semver'),
exec = require('child_process').exec,
Expand All @@ -23,6 +24,16 @@ var srcDir = './src/';
var outDir = './dist/';
var testDir = './test/';

var header = "/*!\n\
* Chart.js\n\
* http://chartjs.org/\n\
* Version: {{ version }}\n\
*\n\
* Copyright 2016 Nick Downie\n\
* Released under the MIT license\n\
* https://github.com/nnnick/Chart.js/blob/master/LICENSE.md\n\
*/\n";

var preTestFiles = [
'./node_modules/moment/min/moment.min.js',
];
Expand Down Expand Up @@ -57,6 +68,7 @@ function buildTask() {
var bundled = browserify('./src/chart.js')
.bundle()
.pipe(source('Chart.bundle.js'))
.pipe(insert.prepend(header))
.pipe(streamify(replace('{{ version }}', package.version)))
.pipe(gulp.dest(outDir))
.pipe(streamify(uglify({
Expand All @@ -69,6 +81,7 @@ function buildTask() {
.ignore('moment')
.bundle()
.pipe(source('Chart.js'))
.pipe(insert.prepend(header))
.pipe(streamify(replace('{{ version }}', package.version)))
.pipe(gulp.dest(outDir))
.pipe(streamify(uglify({
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"gulp-concat": "~2.1.x",
"gulp-connect": "~2.0.5",
"gulp-html-validator": "^0.0.2",
"gulp-insert": "~0.5.0",
"gulp-jshint": "~1.5.1",
"gulp-karma": "0.0.4",
"gulp-replace": "^0.4.0",
Expand Down
11 changes: 0 additions & 11 deletions src/chart.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
/*!
* Chart.js
* http://chartjs.org/
* Version: {{ version }}
*
* Copyright 2015 Nick Downie
* Released under the MIT license
* https://github.com/nnnick/Chart.js/blob/master/LICENSE.md
*/


var Chart = require('./core/core.js')();

require('./core/core.helpers')(Chart);
Expand Down