OGP向けにインスタンスのバナー画像を提供するように
This commit is contained in:
parent
9ab34c2301
commit
be1125dcb9
10 changed files with 28 additions and 82 deletions
52
gulpfile.ts
52
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' }))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue