Split gulpfile.js into separate task files.

This commit is contained in:
Jürg Lehni 2016-01-23 18:26:56 +01:00
parent 145135b4f5
commit eda738d4fa
12 changed files with 320 additions and 226 deletions

31
gulp/tasks/dist.js Normal file
View file

@ -0,0 +1,31 @@
/*
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
* http://paperjs.org/
*
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
* http://scratchdisk.com/ & http://jonathanpuckey.com/
*
* Distributed under the MIT license. See LICENSE file for details.
*
* All rights reserved.
*/
var gulp = require('gulp'),
merge = require('merge-stream'),
zip = require('gulp-zip');
gulp.task('dist', ['minify', 'docs'], function() {
return merge(
gulp.src([
'dist/paper-full*.js',
'dist/paper-core*.js',
'LICENSE.txt',
'examples/**/*',
], { base: '.' }),
gulp.src([
'dist/docs/**/*'
], { base: 'dist' })
)
.pipe(zip('/paperjs.zip'))
.pipe(gulp.dest('dist'));
});