MCPcopy Create free account
hub / github.com/ember-cli/ember-cli / getEmptyTree

Function getEmptyTree

lib/broccoli/merge-trees.js:12–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10}
11
12function getEmptyTree() {
13 if (EMPTY_MERGE_TREE) {
14 return EMPTY_MERGE_TREE;
15 }
16
17 EMPTY_MERGE_TREE = module.exports._upstreamMergeTrees([], {
18 annotation: 'EMPTY_MERGE_TREE',
19 description: 'EMPTY_MERGE_TREE',
20 });
21
22 let originalCleanup = EMPTY_MERGE_TREE.cleanup;
23 EMPTY_MERGE_TREE.cleanup = function () {
24 // this tree is being cleaned up, we must
25 // ensure that our shared EMPTY_MERGE_TREE is
26 // reset (otherwise it will not have a valid
27 // `outputPath`)
28 EMPTY_MERGE_TREE = null;
29 return originalCleanup.apply(this, arguments);
30 };
31
32 return EMPTY_MERGE_TREE;
33}
34
35module.exports = function mergeTrees(_inputTrees, options) {
36 options = options || {};

Callers 1

merge-trees.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…