Skip to content

Commit a6f4f2f

Browse files
rcjohns412fusepilot
authored andcommitted
Issue #26:Fix 'Errors after calling npm run eject' (#28)
Summary: npm [start | run build | run archive] does not work after npm run eject Description: module.exports in path.js does not include appPath, which is used in getSettings() in cep.js to get the extension version number, after eject. This update adds appPath after eject. In addition, scripts/templates was left off the list of folders to copy when ejecting, so templates for .debug, manifest.xml and index.html were not available. This update also adds the folder to the list of folders to copy on eject. Testing Done: create-cep-extension was run to verify the code changes did not affect an unejected package. npm run eject was run and it was verified that scripts/templates existed and all the template files were properly copied. npm start was run and failed due to yarn.lock existing in the project root. npm install was run manually and then npm start was run, which now properly opened the extension in the browser and InDesign. npm run build and npm run archive were run and verifed the results were as expected. Signed-off-by: Rob Johnson <rob.johnson@berkadia.com> Reviewed-by: [reviewer-name] <reviewer-email> Signed-off-by: [owner-name] <owner-email>
1 parent 9f56759 commit a6f4f2f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/create-cep-extension-scripts/config/paths.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ function getServedPath(appPackageJson) {
5151
// config after eject: we're in ./config/
5252
module.exports = {
5353
dotenv: resolveApp('.env'),
54+
appPath: resolveApp('.'),
5455
appBuild: resolveApp('build'),
5556
appPublic: resolveApp('public'),
5657
appHtml: resolveApp('public/index.html'),

packages/create-cep-extension-scripts/scripts/eject.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ inquirer
8080
}
8181
}
8282

83-
const folders = ['config', 'config/jest', 'scripts'];
83+
const folders = ['config', 'config/jest', 'scripts', 'scripts/templates'];
8484

8585
// Make shallow array of files paths
8686
const files = folders.reduce((files, folder) => {

0 commit comments

Comments
 (0)