-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
33 lines (31 loc) · 1.08 KB
/
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
var gulp = require('gulp')
var rename = require('gulp-rename')
var sourcemaps = require('gulp-sourcemaps')
var rollup = require('gulp-better-rollup')
const filter = require('gulp-filter');
const resolve = require('rollup-plugin-node-resolve');
const commonjs = require("rollup-plugin-commonjs")
const typescript = require("rollup-plugin-typescript2")
const screeps = require("rollup-plugin-screeps")
gulp.task('lib-build', () => {
gulp.src('server-test/test/*.ts')
.pipe(sourcemaps.init())
.pipe(rollup({
// There is no `input` option as rollup integrates into the gulp pipeline
plugins: [
resolve(),
commonjs(),
//json(),
typescript({tsconfig: "./tsconfig.json"}),
//screeps({config: cfg, dryRun: cfg == null})
],
external: ["lodash"]
}, {
// Rollups `sourcemap` option is unsupported. Use `gulp-sourcemaps` plugin instead
format: 'cjs',
}))
// inlining the sourcemap into the exported .js file
.pipe(filter(['**','*.ts']))
.pipe(sourcemaps.write())
.pipe(gulp.dest('server-test/test/dist'))
})