Skip to content

Commit 9a41f23

Browse files
committed
perf(build): remove linting and add gulp-cached (mgechev#782)
1 parent 7643241 commit 9a41f23

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

gulpfile.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ loadTasks(PROJECT_TASKS_DIR);
1010
// --------------
1111
// Build dev.
1212
gulp.task('build.dev', (done: any) =>
13-
runSequence('clean.dev',
14-
'tslint',
15-
'css-lint',
13+
runSequence(//'clean.dev',
14+
// 'tslint',
15+
// 'css-lint',
1616
'build.assets.dev',
1717
'build.html_css',
1818
'build.js.dev',

tools/tasks/seed/build.js.dev.ts

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
11
import * as gulp from 'gulp';
22
import * as gulpLoadPlugins from 'gulp-load-plugins';
3+
import * as merge from 'merge-stream';
34
import {join} from 'path';
45
import {APP_SRC, APP_DEST, TOOLS_DIR} from '../../config';
56
import {templateLocals, makeTsProject} from '../../utils';
67
const plugins = <any>gulpLoadPlugins();
78

89
export = () => {
910
let tsProject = makeTsProject();
10-
let src = [
11+
let typings = gulp.src([
1112
'typings/browser.d.ts',
12-
TOOLS_DIR + '/manual_typings/**/*.d.ts',
13+
TOOLS_DIR + '/manual_typings/**/*.d.ts'
14+
]);
15+
let src = [
1316
join(APP_SRC, '**/*.ts'),
1417
'!' + join(APP_SRC, '**/*.spec.ts'),
1518
'!' + join(APP_SRC, '**/*.e2e.ts')
1619
];
17-
let result = gulp.src(src)
20+
21+
let projectFiles = gulp.src(src).pipe(plugins.cached());
22+
let result = merge(typings, projectFiles)
1823
.pipe(plugins.plumber())
1924
.pipe(plugins.sourcemaps.init())
2025
.pipe(plugins.typescript(tsProject));
2126

27+
2228
return result.js
2329
.pipe(plugins.sourcemaps.write())
2430
.pipe(plugins.template(templateLocals()))

0 commit comments

Comments
 (0)