MCPcopy
hub / github.com/microsoft/vscode-js-debug / compileTs

Function compileTs

gulpfile.js:207–303  ·  view source on GitHub ↗
({
  packages = [],
  sourcemap = false,
  compileInPlace = false,
  minify = isWatch ? false : true,
  watch = false,
} = options)

Source from the content-addressed store, hash-verified

205}
206
207async function compileTs({
208 packages = [],
209 sourcemap = false,
210 compileInPlace = false,
211 minify = isWatch ? false : true,
212 watch = false,
213} = options) {
214 const vendorPrefix = 'vendor';
215
216 // don't watch these, they won't really change:
217 const vendors = new Map(
218 await Promise.all(
219 [
220 {
221 ...compileVendorLibrary('acorn-loose'),
222 plugins: [esbuildPlugins.hackyVendorBundle(new Map([['acorn', './acorn']]))],
223 },
224 compileVendorLibrary('acorn'),
225 ].map(async ({ name, ...opts }) => {
226 await esbuild.build({
227 ...opts,
228 sourcemap,
229 bundle: true,
230 platform: 'node',
231 format: 'cjs',
232 target: 'node20',
233 minify,
234 });
235
236 return [name, `./${vendorPrefix}/${name}.js`];
237 }),
238 ),
239 );
240
241 // add the entrypoints common to both vscode and vs here
242 packages = [
243 ...packages,
244 { entry: `${srcDir}/common/hash/hash.ts`, library: false },
245 { entry: `${srcDir}/common/sourceMaps/renameWorker.ts`, library: false },
246 { entry: `${srcDir}/targets/node/bootloader.ts`, library: false, target: 'node10' },
247 { entry: `${srcDir}/targets/node/watchdog.ts`, library: false, target: 'node10' },
248 {
249 entry: `${srcDir}/diagnosticTool/diagnosticTool.tsx`,
250 library: false,
251 target: 'chrome102',
252 platform: 'browser',
253 },
254 ];
255
256 const define = await getConstantDefines();
257
258 let todo = [];
259 for (
260 const {
261 entry,
262 platform = 'node',
263 library,
264 isInVsCode,

Callers 1

gulpfile.jsFile · 0.85

Calls 8

compileVendorLibraryFunction · 0.85
getConstantDefinesFunction · 0.85
incrementalEsbuildFunction · 0.85
allMethod · 0.80
mapMethod · 0.80
buildMethod · 0.80
resolveMethod · 0.80
pushMethod · 0.65

Tested by

no test coverage detected