Clean up before release preparation

This commit is contained in:
Dmitriy Simushev 2015-03-31 10:54:34 +00:00
parent 0f8b5da18a
commit a4ce7ffea7
2 changed files with 18 additions and 0 deletions

View File

@ -7,6 +7,7 @@ var fs = require('fs'),
lodash = require('lodash'),
PoFile = require('pofile'),
strftime = require('strftime'),
del = require('del'),
bower = require('bower'),
gulp = require('gulp'),
uglify = require('gulp-uglify'),
@ -44,6 +45,21 @@ var config = {
}
// Cleans all built files
gulp.task('clean', function(callback) {
del([
'release',
'composer.lock',
config.phpVendorPath,
config.jsVendorPath,
config.jsPath + '/compiled/**/*.*',
'!' + config.jsPath + '/compiled/.keep',
config.chatStylesPath + '/default/templates_compiled/client_side/*.js',
config.chatStylesPath + '/default/js/compiled/*.js',
config.pageStylesPath + '/default/templates_compiled/client_side/*.js'
], callback);
});
// Checks all PHP files with PHP Code Sniffer.
gulp.task('phpcs', ['composer-install-dev'], function() {
return gulp.src([
@ -323,6 +339,7 @@ gulp.task('pack-sources', ['composer-install', 'bower-install'], function() {
// Performs all tasks in the correct order.
gulp.task('prepare-release', function(callback) {
runSequence(
'clean',
['phpcs', 'js', 'chat-styles', 'page-styles', 'generate-pot'],
'pack-sources',
callback

View File

@ -22,6 +22,7 @@
"pofile": "~0.2.12",
"lodash": "~2.4.1",
"strftime": "~0.8.2",
"del": "~1.1.1",
"event-stream": "~3.2.1"
}
}