mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-26 11:57:34 -07:00
✌️
This commit is contained in:
parent
417ab3acc5
commit
b8ee494982
1 changed files with 6 additions and 7 deletions
13
gulpfile.ts
13
gulpfile.ts
|
@ -26,11 +26,16 @@ import * as rimraf from 'rimraf';
|
||||||
import * as escapeHtml from 'escape-html';
|
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';
|
||||||
|
|
||||||
const env = process.env.NODE_ENV;
|
const env = process.env.NODE_ENV;
|
||||||
const isProduction = env === 'production';
|
const isProduction = env === 'production';
|
||||||
const isDebug = !isProduction;
|
const isDebug = !isProduction;
|
||||||
|
|
||||||
|
if (isDebug) {
|
||||||
|
console.log(chalk.yellow.bold('!!!注意!!! 開発モードでのビルドです。(成果物の圧縮などはスキップされます)'));
|
||||||
|
}
|
||||||
|
|
||||||
if (!fs.existsSync('./.config/default.yml')) {
|
if (!fs.existsSync('./.config/default.yml')) {
|
||||||
console.log('npm run configを実行して設定ファイルを作成してください');
|
console.log('npm run configを実行して設定ファイルを作成してください');
|
||||||
process.exit();
|
process.exit();
|
||||||
|
@ -147,13 +152,7 @@ gulp.task('build:client', [
|
||||||
'build:client:styles',
|
'build:client:styles',
|
||||||
'build:client:pug',
|
'build:client:pug',
|
||||||
'copy:client'
|
'copy:client'
|
||||||
], () => {
|
]);
|
||||||
gutil.log('ビルドが終了しました。');
|
|
||||||
|
|
||||||
if (isDebug) {
|
|
||||||
gutil.log('!!!注意!!! 開発モードでのビルドです。(成果物の圧縮などはスキップされます)');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('build:client:scripts', () => new Promise(async (ok) => {
|
gulp.task('build:client:scripts', () => new Promise(async (ok) => {
|
||||||
// Get commit info
|
// Get commit info
|
||||||
|
|
Loading…
Reference in a new issue