diff --git a/__tests__/init.test.js b/__tests__/init.test.js index 4958d58..20e0d59 100644 --- a/__tests__/init.test.js +++ b/__tests__/init.test.js @@ -79,9 +79,9 @@ describe('init', () => { mockFs.setMockFiles({ [basePath]: { - packages: { + plugins: { [pluginsNames[0]]: { - activatorPath: activatorsPaths[0], + activator: activatorsPaths[0], }, }, }, diff --git a/init.js b/init.js index bd0c172..52dc48f 100644 --- a/init.js +++ b/init.js @@ -13,13 +13,12 @@ const scanActivators = () => { } const getActivatorsFromCache = () => { - const cacheActivatorsPath = path.resolve(__dirname, '../../build/activators.json') - - const cache = fs.readJsonSync(cacheActivatorsPath, { throws: false }) + const cachePath = path.resolve(__dirname, '../../build/plugins.json') + const cache = fs.readJsonSync(cachePath, { throws: false }) if (cache) { - const activators = Object.values(cache.packages) - .map(plugin => plugin.activatorPath) + const activators = Object.values(cache.plugins) + .map(plugin => plugin.activator) .filter(activator => !!activator) .map(activator => require(activator))