MCPcopy
hub / github.com/meteor/meteor / makeIsopacketBuildContext

Function makeIsopacketBuildContext

tools/tool-env/isopackets.js:270–293  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

268};
269
270export function makeIsopacketBuildContext() {
271 var context = {};
272 var catalog = newIsopacketBuildingCatalog();
273 var versions = {};
274 _.each(catalog.getAllPackageNames(), function (packageName) {
275 versions[packageName] = catalog.getLatestVersion(packageName).version;
276 });
277 context.packageMap = new packageMapModule.PackageMap(versions, {
278 localCatalog: catalog
279 });
280 // Make an isopack cache that doesn't save isopacks to disk and has no
281 // access to versioned packages.
282 context.isopackCache = new isopackCacheModule.IsopackCache({
283 packageMap: context.packageMap,
284 includeCordovaUnibuild: false,
285 // When linking JS files, don't include the padding spaces and line number
286 // comments. Since isopackets are loaded as part of possibly very short
287 // 'meteor' tool command invocations, we care more about startup time than
288 // legibility, and the difference is actually observable (eg 25% speedup
289 // loading constraint-solver).
290 noLineNumbers: true
291 });
292 return context;
293}
294
295// Loads a built isopacket from disk. Always loads (the cache is in 'load', not
296// this function). Does not run a build process; it must already be built.

Callers 2

isopack.jsFile · 0.90
ensureIsopacketsLoadableFunction · 0.85

Calls 2

eachMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…