Implements #51

This commit is contained in:
syuilo 2017-01-20 04:43:17 +09:00
parent fb70136d1e
commit ecc2b344ea
2 changed files with 15 additions and 8 deletions

View file

@ -27,6 +27,8 @@ import * as escapeHtml from 'escape-html';
import prominence = require('prominence'); import prominence = require('prominence');
import promiseify = require('promiseify'); import promiseify = require('promiseify');
import * as chalk from 'chalk'; import * as chalk from 'chalk';
import imagemin = require('gulp-imagemin');
import * as rename from 'gulp-rename';
const env = process.env.NODE_ENV; const env = process.env.NODE_ENV;
const isProduction = env === 'production'; const isProduction = env === 'production';
@ -235,14 +237,16 @@ gulp.task('copy:client', [
'build:client:scripts', 'build:client:scripts',
'build:client:styles' 'build:client:styles'
], () => ], () =>
es.merge( gulp.src([
gulp.src('./resources/**/*').pipe(gulp.dest('./built/web/resources/')), './resources/**/*',
gulp.src('./src/web/resources/**/*').pipe(gulp.dest('./built/web/resources/')), './src/web/resources/**/*',
gulp.src('./src/web/app/desktop/resources/**/*').pipe(gulp.dest('./built/web/resources/desktop/')), './src/web/app/*/resources/**/*'
gulp.src('./src/web/app/mobile/resources/**/*').pipe(gulp.dest('./built/web/resources/mobile/')), ])
gulp.src('./src/web/app/dev/resources/**/*').pipe(gulp.dest('./built/web/resources/dev/')), .pipe(imagemin())
gulp.src('./src/web/app/auth/resources/**/*').pipe(gulp.dest('./built/web/resources/auth/')) .pipe(rename(path => {
) path.dirname = path.dirname.replace('resources', '.');
}))
.pipe(gulp.dest('./built/web/resources/'))
); );
gulp.task('build:client:pug', [ gulp.task('build:client:pug', [

View file

@ -37,6 +37,7 @@
"@types/gm": "1.17.29", "@types/gm": "1.17.29",
"@types/gulp": "3.8.32", "@types/gulp": "3.8.32",
"@types/gulp-babel": "6.1.29", "@types/gulp-babel": "6.1.29",
"@types/gulp-rename": "0.0.31",
"@types/gulp-tslint": "3.6.30", "@types/gulp-tslint": "3.6.30",
"@types/gulp-typescript": "0.0.32", "@types/gulp-typescript": "0.0.32",
"@types/gulp-uglify": "0.0.29", "@types/gulp-uglify": "0.0.29",
@ -94,8 +95,10 @@
"gulp": "3.9.1", "gulp": "3.9.1",
"gulp-babel": "6.1.2", "gulp-babel": "6.1.2",
"gulp-cssnano": "2.1.2", "gulp-cssnano": "2.1.2",
"gulp-imagemin": "3.1.1",
"gulp-livescript": "3.0.1", "gulp-livescript": "3.0.1",
"gulp-pug": "3.2.0", "gulp-pug": "3.2.0",
"gulp-rename": "1.2.2",
"gulp-replace": "0.5.4", "gulp-replace": "0.5.4",
"gulp-stylus": "2.6.0", "gulp-stylus": "2.6.0",
"gulp-tslint": "7.0.1", "gulp-tslint": "7.0.1",