()
| 268 | }; |
| 269 | |
| 270 | export 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. |
no test coverage detected
searching dependent graphs…