gulp-plugin

Accessing typescript file variable values using gulp

こ雲淡風輕ζ 提交于 2019-12-12 03:25:20
问题 I have several typescript files, some of them export a const named APIS . I'm trying to access those exports (I want to concatenated all of them to a single file), but it doesn't seem to work. I'm obviously doing something wrong, but I'm not sure what. For example, I have a folder named services, with 2 files: service1.ts, service2.ts. service1.ts: ... export const APIS = [ { "field1" : "blabla" } ]; service2.ts: does not contain the APIS var. This is my gulpfile.js: var gulp = require('gulp'