forked from mirror/misskey
Separate tsconfig.json so that ts-node can work with gulpfile.ts
This commit is contained in:
parent
3fc6aef313
commit
314ff6777a
@ -1 +0,0 @@
|
|||||||
eval(require('typescript').transpile(require('fs').readFileSync('./gulpfile.ts').toString()));
|
|
16
gulpfile.ts
16
gulpfile.ts
@ -8,7 +8,7 @@ import * as gulp from 'gulp';
|
|||||||
import * as gutil from 'gulp-util';
|
import * as gutil from 'gulp-util';
|
||||||
import * as babel from 'gulp-babel';
|
import * as babel from 'gulp-babel';
|
||||||
import * as ts from 'gulp-typescript';
|
import * as ts from 'gulp-typescript';
|
||||||
import * as tslint from 'gulp-tslint';
|
import tslint from 'gulp-tslint';
|
||||||
import * as glob from 'glob';
|
import * as glob from 'glob';
|
||||||
import * as es from 'event-stream';
|
import * as es from 'event-stream';
|
||||||
import * as webpack from 'webpack-stream';
|
import * as webpack from 'webpack-stream';
|
||||||
@ -32,7 +32,7 @@ if (isDebug) {
|
|||||||
|
|
||||||
const constants = require('./src/const.json');
|
const constants = require('./src/const.json');
|
||||||
|
|
||||||
const tsProject = ts.createProject('tsconfig.json');
|
const tsProject = ts.createProject('./src/tsconfig.json');
|
||||||
|
|
||||||
gulp.task('build', [
|
gulp.task('build', [
|
||||||
'build:js',
|
'build:js',
|
||||||
@ -92,11 +92,11 @@ gulp.task('build:copy', () =>
|
|||||||
gulp.src([
|
gulp.src([
|
||||||
'./src/**/resources/**/*',
|
'./src/**/resources/**/*',
|
||||||
'!./src/web/app/**/resources/**/*'
|
'!./src/web/app/**/resources/**/*'
|
||||||
]).pipe(gulp.dest('./built/')),
|
]).pipe(gulp.dest('./built/')) as any,
|
||||||
gulp.src([
|
gulp.src([
|
||||||
'./src/web/about/**/*',
|
'./src/web/about/**/*',
|
||||||
'!./src/web/about/**/*.pug'
|
'!./src/web/about/**/*.pug'
|
||||||
]).pipe(gulp.dest('./built/web/about/'))
|
]).pipe(gulp.dest('./built/web/about/')) as any
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -155,8 +155,8 @@ gulp.task('build:client:scripts', () => new Promise(async (ok) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
es.merge(
|
es.merge(
|
||||||
stream.pipe(gulp.dest('./built/web/resources/')),
|
stream.pipe(gulp.dest('./built/web/resources/')) as any,
|
||||||
entryPointStream.pipe(gulp.dest('./built/web/resources/client/'))
|
entryPointStream.pipe(gulp.dest('./built/web/resources/client/')) as any
|
||||||
);
|
);
|
||||||
|
|
||||||
ok();
|
ok();
|
||||||
@ -165,7 +165,7 @@ gulp.task('build:client:scripts', () => new Promise(async (ok) => {
|
|||||||
gulp.task('build:client:styles', () =>
|
gulp.task('build:client:styles', () =>
|
||||||
gulp.src('./src/web/app/init.css')
|
gulp.src('./src/web/app/init.css')
|
||||||
.pipe(isProduction
|
.pipe(isProduction
|
||||||
? cssnano()
|
? (cssnano as any)()
|
||||||
: gutil.noop())
|
: gutil.noop())
|
||||||
.pipe(gulp.dest('./built/web/resources/'))
|
.pipe(gulp.dest('./built/web/resources/'))
|
||||||
);
|
);
|
||||||
@ -178,7 +178,7 @@ gulp.task('copy:client', [
|
|||||||
'./src/web/resources/**/*',
|
'./src/web/resources/**/*',
|
||||||
'./src/web/app/*/resources/**/*'
|
'./src/web/app/*/resources/**/*'
|
||||||
])
|
])
|
||||||
.pipe(isProduction ? imagemin() : gutil.noop())
|
.pipe(isProduction ? (imagemin as any)() : gutil.noop())
|
||||||
.pipe(rename(path => {
|
.pipe(rename(path => {
|
||||||
path.dirname = path.dirname.replace('resources', '.');
|
path.dirname = path.dirname.replace('resources', '.');
|
||||||
}))
|
}))
|
||||||
|
@ -137,6 +137,7 @@
|
|||||||
"syuilo-password-strength": "0.0.1",
|
"syuilo-password-strength": "0.0.1",
|
||||||
"tcp-port-used": "0.1.2",
|
"tcp-port-used": "0.1.2",
|
||||||
"textarea-caret": "3.0.2",
|
"textarea-caret": "3.0.2",
|
||||||
|
"ts-node": "2.1.0",
|
||||||
"tslint": "4.4.2",
|
"tslint": "4.4.2",
|
||||||
"typescript": "2.1.6",
|
"typescript": "2.1.6",
|
||||||
"uuid": "3.0.1",
|
"uuid": "3.0.1",
|
||||||
|
23
src/tsconfig.json
Normal file
23
src/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"noEmitOnError": false,
|
||||||
|
"noImplicitAny": false,
|
||||||
|
"noImplicitReturns": true,
|
||||||
|
"noUnusedParameters": false,
|
||||||
|
"noUnusedLocals": true,
|
||||||
|
"noFallthroughCasesInSwitch": true,
|
||||||
|
"declaration": false,
|
||||||
|
"sourceMap": false,
|
||||||
|
"target": "es6",
|
||||||
|
"module": "commonjs",
|
||||||
|
"removeComments": false,
|
||||||
|
"noLib": false
|
||||||
|
},
|
||||||
|
"compileOnSave": false,
|
||||||
|
"include": [
|
||||||
|
"./**/*.ts"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"./web/app/**/*.ts"
|
||||||
|
]
|
||||||
|
}
|
@ -11,16 +11,10 @@
|
|||||||
"target": "es6",
|
"target": "es6",
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"removeComments": false,
|
"removeComments": false,
|
||||||
"noLib": false,
|
"noLib": false
|
||||||
"outDir": "built",
|
|
||||||
"rootDir": "src"
|
|
||||||
},
|
},
|
||||||
"compileOnSave": false,
|
"compileOnSave": false,
|
||||||
"include": [
|
"include": [
|
||||||
"./node_modules/typescript/lib/lib.es6.d.ts",
|
"./gulpfile.ts"
|
||||||
"./src/**/*.ts"
|
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"./src/web/app/**/*.ts"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user