Extracting typescript exports to json file using gulp
问题 I have several typescript files, some of them export a certain var - named APIS - which is an array of objects. I want to extract the values of all of these exports, and pipe them to a json file using gulp. For example, I have a folder named services, with 3 files: service1.ts, service2.ts, service3.ts. service1.ts: ... export const APIS = [ { "field1" : "blabla" } ]; service2.ts: ... export const APIS = [ { "field2" : "yadayada" }, { "field3" : "yadabla" } ]; service3.ts: - does not export