*/
var srcFiles = [
- './src/core/core.js',
- './src/core/core.helpers.js',
- './src/core/core.chart.js',
- './src/core/core.element.js',
- './src/core/**',
- './src/controllers/**',
- './src/scales/**',
- './src/elements/**',
- './src/charts/**',
- './node_modules/color/dist/color.min.js'
- ];
-
- gulp.task('build', function() {
+ './src/core/core.js',
+ './src/core/core.helpers.js',
+ './src/core/core.chart.js',
+ './src/core/core.element.js',
+ './src/core/**',
+ './src/controllers/**',
+ './src/scales/**',
+ './src/elements/**',
+ './src/charts/**',
+ './node_modules/color/dist/color.min.js'
+ ];
+
+
+ gulp.task('build', buildTask);
++gulp.task('coverage', coverageTask);
+ gulp.task('watch', watchTask);
+ gulp.task('bump', bumpTask);
+ gulp.task('release', ['build'], releaseTask);
+ gulp.task('jshint', jshintTask);
+ gulp.task('test', ['jshint', 'validHTML', 'unittest']);
+ gulp.task('size', ['library-size', 'module-sizes']);
+ gulp.task('server', serverTask);
+ gulp.task('validHTML', validHTMLTask);
+ gulp.task('unittest', unittestTask);
+ gulp.task('unittestWatch', unittestWatchTask);
+ gulp.task('library-size', librarySizeTask);
+ gulp.task('module-sizes', moduleSizesTask);
+ gulp.task('_open', _openTask);
+ gulp.task('dev', ['server', 'default']);
+
+ gulp.task('default', ['build', 'watch']);
+
+
+ function buildTask() {
var isCustom = !!(util.env.types),
outputDir = (isCustom) ? 'custom' : '.';
configFile: 'karma.conf.js',
action: 'watch'
}));
- });
+ }
- gulp.task('coverage', function() {
++function coverageTask() {
+ var files = srcFiles.slice();
+ files.push(testDir + '*.js');
+
+ return gulp.src(files)
+ .pipe(karma({
+ configFile: 'karma.coverage.conf.js',
+ action: 'run'
+ }));
- });
++}
+
- gulp.task('library-size', function() {
+ function librarySizeTask() {
return gulp.src('Chart.min.js')
.pipe(size({
gzip: true
showFiles: true,
gzip: true
}));
- });
-
- gulp.task('watch', function() {
- gulp.watch('./src/**', ['build', 'unittest']);
- });
+ }
- gulp.task('test', ['jshint', 'valid', 'unittest']);
-
+ function watchTask() {
+ gulp.watch('./src/**', ['build', 'unittest', 'unittestWatch']);
+ }
- gulp.task('size', ['library-size', 'module-sizes']);
--
- gulp.task('default', ['build', 'watch']);
--
- gulp.task('server', function() {
+ function serverTask() {
connect.server({
port: 8000
});