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

Function ensureTargetDirIsAddon

lib/models/blueprint.js:1690–1704  ·  view source on GitHub ↗
(addonPath)

Source from the content-addressed store, hash-verified

1688}
1689
1690function ensureTargetDirIsAddon(addonPath) {
1691 let projectInfo;
1692
1693 try {
1694 projectInfo = require(path.join(addonPath, 'package.json'));
1695 } catch (err) {
1696 if (err.code === 'MODULE_NOT_FOUND') {
1697 throw new Error(`The directory ${addonPath} does not appear to be a valid addon directory.`);
1698 } else {
1699 throw err;
1700 }
1701 }
1702
1703 return isAddon(projectInfo.keywords);
1704}
1705
1706/**
1707 @private

Callers 1

_checkInRepoAddonExistsFunction · 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…