-
Notifications
You must be signed in to change notification settings - Fork 10
/
gulpfile.js
38 lines (33 loc) · 926 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
const gulp = require('gulp');
const typescript = require('gulp-tsc');
const replace = require('gulp-replace-path');
const config = {
target: "es2017",
module: "es2015",
lib: ["es2017", "dom"],
declaration: true,
sourceMap: true,
inlineSources: true,
outDir: "./lib",
baseUrl: ".",
strict: true,
noUnusedLocals: true,
noUnusedParameters: true,
noImplicitReturns: true,
noFallthroughCasesInSwitch: true,
experimentalDecorators: true,
emitDecoratorMetadata: true
};
gulp.task('compile', function(){
gulp.src(['src/*.ts'])
.pipe(typescript(config))
.pipe(replace(/..\/node_modules/g, '..'))
.pipe(gulp.dest('.'));
gulp.src('lit-element.js')
.pipe(gulp.dest('node_modules/lit-html-element'));
let testConfig = config;
testConfig.emitDecoratorMetadata = true;
gulp.src(['test/ts/*.ts'])
.pipe(typescript(config))
.pipe(gulp.dest('.'));
});