Update gulp script
This commit is contained in:
parent
9f19897528
commit
2612bf1cfe
53
gulpfile.js
53
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('../'))
|
||||
|
@ -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",
|
||||
|
10
yarn.lock
10
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:
|
||||
|
Loading…
Reference in New Issue
Block a user