diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-12-15 23:19:04 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-12-15 23:19:04 +0900 |
| commit | be1125dcb92d8c6e972e00ac4697e136d0fec2bd (patch) | |
| tree | 76e69a0fadf42b6e880ab604cb2f86860ab24896 /gulpfile.ts | |
| parent | Update index.ts (#3624) (diff) | |
| download | sharkey-be1125dcb92d8c6e972e00ac4697e136d0fec2bd.tar.gz sharkey-be1125dcb92d8c6e972e00ac4697e136d0fec2bd.tar.bz2 sharkey-be1125dcb92d8c6e972e00ac4697e136d0fec2bd.zip | |
OGP向けにインスタンスのバナー画像を提供するように
Diffstat (limited to 'gulpfile.ts')
| -rw-r--r-- | gulpfile.ts | 52 |
1 files changed, 1 insertions, 51 deletions
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. - // <input value="foo" readonly="readonly"> to - // <input value="foo" readonly> - collapseBooleanAttributes: true, - - // テキストの一部かもしれない空白も削除する e.g. - // <div> <p> foo </p> </div> to - // <div><p>foo</p></div> - collapseWhitespace: true, - - // タグ間の改行を保持する - preserveLineBreaks: true, - - // (できる場合は)属性のクォーテーション削除する e.g. - // <p class="foo-bar" id="moo" title="blah blah">foo</p> to - // <p class=foo-bar id=moo title="blah blah">foo</p> - removeAttributeQuotes: true, - - // 省略可能なタグを省略する e.g. - // <html><p>yo</p></html> ro - // <p>yo</p> - removeOptionalTags: true, - - // 属性の値がデフォルトと同じなら省略する e.g. - // <input type="text"> to - // <input> - removeRedundantAttributes: true, - - // CSSも圧縮する - minifyCSS: true - })) - .pipe(gulp.dest('./built/client/app/')) -); - gulp.task('locales', () => gulp.src('./locales/*.yml') .pipe(yaml({ schema: 'DEFAULT_SAFE_SCHEMA' })) |