diff --git a/index.js b/index.js index de266d8599d..533c4c1c69b 100644 --- a/index.js +++ b/index.js @@ -10,6 +10,7 @@ const merge = require('broccoli-merge-trees'); const semver = require('semver'); const version = require('./lib/version'); const BroccoliDebug = require('broccoli-debug'); +const calculateCacheKeyForTree = require('calculate-cache-key-for-tree'); // allow toggling of heimdall instrumentation let INSTRUMENT_HEIMDALL = false; @@ -213,6 +214,9 @@ module.exports = { production: app.bowerDirectory + '/ember-data/ember-data.prod.js' }); } + }, + + cacheKeyForTree(treeType) { + return calculateCacheKeyForTree(treeType, this); } }; - diff --git a/package.json b/package.json index 7150226bca7..5d40e736268 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "broccoli-funnel": "^1.2.0", "broccoli-merge-trees": "^2.0.0", "broccoli-rollup": "^1.2.0", + "calculate-cache-key-for-tree": "^1.1.0", "chalk": "^1.1.1", "ember-cli-babel": "^6.4.1", "ember-cli-path-utils": "^1.0.0", diff --git a/yarn.lock b/yarn.lock index aebf82223c6..7a7783e870c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1490,6 +1490,12 @@ calculate-cache-key-for-tree@^1.0.0: dependencies: json-stable-stringify "^1.0.1" +calculate-cache-key-for-tree@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/calculate-cache-key-for-tree/-/calculate-cache-key-for-tree-1.1.0.tgz#0c3e42c9c134f3c9de5358c0f16793627ea976d6" + dependencies: + json-stable-stringify "^1.0.1" + caller-path@^0.1.0: version "0.1.0" resolved "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f"