From 2612bf1cfe4b14445f114c11b98cbae542f89053 Mon Sep 17 00:00:00 2001 From: printempw Date: Thu, 9 Nov 2017 20:50:56 +0800 Subject: [PATCH] Update gulp script --- gulpfile.js | 53 ++++++++++++++++++++++++++-------------------------- package.json | 1 - yarn.lock | 10 +--------- 3 files changed, 27 insertions(+), 37 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 952cc653..8998e049 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -7,7 +7,7 @@ var gulp = require('gulp'), sass = require('gulp-sass'), cleanCss = require('gulp-clean-css'), del = require('del'), - exec = require('gulp-exec'), + exec = require('child_process').exec, concat = require('gulp-concat'), zip = require('gulp-zip'), replace = require('gulp-batch-replace'), @@ -165,6 +165,11 @@ gulp.task('clean', () => { // aka. `yarn run release` gulp.task('zip', () => { clearCache(); + console.log('Cache file deleted'); + + exec('composer dump-autoload --no-dev', () => { + console.log('Autoload files generated without autoload-dev'); + }); let zipPath = `blessing-skin-server-v${version}.zip`; @@ -172,40 +177,34 @@ gulp.task('zip', () => { return gulp.src([ '**/*.*', + 'artisan', 'LICENSE', - '!tests/**/*.*', - '!node_modules/**/*.*', - '!storage/textures/**/*.*', - '!.env', '!.babelrc', - '!.bowerrc', - '!.gitignore', - '!.git/**/*.*', - '!.github/**/*.*', - '!.gitmodules', - '!.gitattributes', - '!gulpfile.js', '!.eslintrc.js', '!.travis.yml', + '!{.env,.env.testing}', + '!{.git,.git/**}', + '!{.github,.github/**}', + '!{.gitignore,.gitmodules,.gitattributes}', + '!gulpfile.js', + '!composer.*', '!yarn.lock', - '!package.json', - '!composer.json', - '!composer.lock', - '!coverage/**/*.*', - '!bower.json', + '!plugins/**', '!phpunit.xml', - '!plugins/**/*.*', - '!resources/assets/src/**/*.*', - '!resources/assets/dist/**/maps/*.map', - '!resources/assets/dist/**/maps/', + '!package.json', + '!{tests,tests/**}', + '!{coverage,coverage/**}', + '!{node_modules,node_modules/**}', + '!storage/textures/**', + '!resources/assets/{src,src/**}', + '!resources/assets/dist/**/{maps,maps/**}', // do not pack packages for developments - '!vendor/fzaninotto/**/*.*', - '!vendor/mockery/**/*.*', - '!vendor/phpunit/**/*.*', - '!vendor/symfony/css-selector/**/*.*', - '!vendor/symfony/dom-crawler/**/*.*' + '!vendor/fzaninotto/**', + '!vendor/mockery/**', + '!vendor/phpunit/**', + '!vendor/symfony/css-selector/**', + '!vendor/symfony/dom-crawler/**' ], { dot: true }) - .pipe(exec('composer dump-autoload --no-dev')) .pipe(zip(zipPath)) .pipe(notify('Don\'t forget to compile Sass & ES2015 files before publishing a release!')) .pipe(gulp.dest('../')) diff --git a/package.json b/package.json index 7fec63e7..e6b93715 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,6 @@ "gulp-clean-css": "^3.6.0", "gulp-concat": "^2.6.1", "gulp-eslint": "^4.0.0", - "gulp-exec": "^2.1.3", "gulp-notify": "^3.0.0", "gulp-sass": "^3.1.0", "gulp-sourcemaps": "^2.6.1", diff --git a/yarn.lock b/yarn.lock index 860dd8b4..735622bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1999,14 +1999,6 @@ gulp-eslint@^4.0.0: eslint "^4.0.0" gulp-util "^3.0.8" -gulp-exec@^2.1.3: - version "2.1.3" - resolved "http://registry.npm.taobao.org/gulp-exec/download/gulp-exec-2.1.3.tgz#460a4ec8df86841d1738bc74958c68e5769342d9" - dependencies: - gulp-util "^3.0.7" - gulplog "^1.0.0" - through2 "^2.0.1" - gulp-notify@^3.0.0: version "3.0.0" resolved "http://registry.npm.taobao.org/gulp-notify/download/gulp-notify-3.0.0.tgz#a04b8af9acdbe4e63c845678ce0c3d30694c59a3" @@ -2056,7 +2048,7 @@ gulp-uglify@^3.0.0: uglify-js "^3.0.5" vinyl-sourcemaps-apply "^0.2.0" -gulp-util@3.0.8, gulp-util@^3.0, gulp-util@^3.0.0, gulp-util@^3.0.7, gulp-util@^3.0.8: +gulp-util@3.0.8, gulp-util@^3.0, gulp-util@^3.0.0, gulp-util@^3.0.8: version "3.0.8" resolved "http://registry.npm.taobao.org/gulp-util/download/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f" dependencies: