From be1125dcb92d8c6e972e00ac4697e136d0fec2bd Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 15 Dec 2018 23:19:04 +0900 Subject: [PATCH] =?UTF-8?q?OGP=E5=90=91=E3=81=91=E3=81=AB=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E3=82=B9=E3=82=BF=E3=83=B3=E3=82=B9=E3=81=AE=E3=83=90?= =?UTF-8?q?=E3=83=8A=E3=83=BC=E7=94=BB=E5=83=8F=E3=82=92=E6=8F=90=E4=BE=9B?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gulpfile.ts | 52 +------------------ package.json | 3 -- .../common/views/components/analog-clock.vue | 4 +- src/client/app/config.ts | 1 - src/const.json | 4 +- src/server/web/index.ts | 12 ++--- src/{client/app => server/web/views}/base.pug | 15 +++--- src/server/web/views/note.pug | 8 +-- src/server/web/views/user.pug | 10 ++-- webpack.config.ts | 1 - 10 files changed, 28 insertions(+), 82 deletions(-) rename src/{client/app => server/web/views}/base.pug (62%) diff --git a/gulpfile.ts b/gulpfile.ts index 7aa582abf9..08175914a1 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -11,14 +11,12 @@ import tslint from 'gulp-tslint'; const cssnano = require('gulp-cssnano'); const stylus = require('gulp-stylus'); import * as uglifyComposer from 'gulp-uglify/composer'; -import pug = require('gulp-pug'); import * as rimraf from 'rimraf'; import chalk from 'chalk'; const imagemin = require('gulp-imagemin'); import * as rename from 'gulp-rename'; import * as mocha from 'gulp-mocha'; import * as replace from 'gulp-replace'; -import * as htmlmin from 'gulp-htmlmin'; const uglifyes = require('uglify-es'); const locales = require('./locales'); @@ -34,8 +32,6 @@ if (isDebug) { console.warn(chalk.yellow.bold(' built script will not be compressed.')); } -const constants = require('./src/const.json'); - gulp.task('build', [ 'build:ts', 'build:copy', @@ -109,7 +105,7 @@ gulp.task('default', ['build']); gulp.task('build:client', [ 'build:ts', 'build:client:script', - 'build:client:pug', + 'build:client:styles', 'copy:client' ]); @@ -148,52 +144,6 @@ gulp.task('copy:client', [ .pipe(gulp.dest('./built/client/assets/')) ); -gulp.task('build:client:pug', [ - 'copy:client', - 'build:client:script', - 'build:client:styles' -], () => - gulp.src('./src/client/app/base.pug') - .pipe(pug({ - locals: { - themeColor: constants.themeColor - } - })) - .pipe(htmlmin({ - // 真理値属性の簡略化 e.g. - // to - // - collapseBooleanAttributes: true, - - // テキストの一部かもしれない空白も削除する e.g. - //

foo

to - //

foo

- collapseWhitespace: true, - - // タグ間の改行を保持する - preserveLineBreaks: true, - - // (できる場合は)属性のクォーテーション削除する e.g. - //

foo

to - //

foo

- removeAttributeQuotes: true, - - // 省略可能なタグを省略する e.g. - //

yo

ro - //

yo

- removeOptionalTags: true, - - // 属性の値がデフォルトと同じなら省略する e.g. - // to - // - removeRedundantAttributes: true, - - // CSSも圧縮する - minifyCSS: true - })) - .pipe(gulp.dest('./built/client/app/')) -); - gulp.task('locales', () => gulp.src('./locales/*.yml') .pipe(yaml({ schema: 'DEFAULT_SAFE_SCHEMA' })) diff --git a/package.json b/package.json index 8ea7773def..e88fe20323 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,6 @@ "@types/elasticsearch": "5.0.29", "@types/file-type": "5.2.2", "@types/gulp": "3.8.36", - "@types/gulp-htmlmin": "1.3.32", "@types/gulp-mocha": "0.0.32", "@types/gulp-rename": "0.0.33", "@types/gulp-replace": "0.0.31", @@ -120,10 +119,8 @@ "fuckadblock": "3.2.1", "gulp": "3.9.1", "gulp-cssnano": "2.1.3", - "gulp-htmlmin": "5.0.1", "gulp-imagemin": "4.1.0", "gulp-mocha": "6.0.0", - "gulp-pug": "4.0.1", "gulp-rename": "1.4.0", "gulp-replace": "1.0.0", "gulp-sourcemaps": "2.6.4", diff --git a/src/client/app/common/views/components/analog-clock.vue b/src/client/app/common/views/components/analog-clock.vue index 43ae2ca933..8795076bb3 100644 --- a/src/client/app/common/views/components/analog-clock.vue +++ b/src/client/app/common/views/components/analog-clock.vue @@ -32,7 +32,7 @@