[ https://issues.apache.org/jira/browse/CB-12425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15947657#comment-15947657 ]
ASF GitHub Bot commented on CB-12425: ------------------------------------- Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/521#discussion_r108751887 --- Diff: cordova-lib/src/cordova/restore-util.js --- @@ -64,7 +64,25 @@ function installPlatformsFromConfigXML(platforms, opts) { // Combining arrays and checking duplicates. comboArray = pkgJsonPlatforms.slice(); } + engines = cfg.getEngines(projectHome); + + // TODO: CB-12592: Eventually refactor out to pacakge manager module. + // If package.json doesn't exist, auto-create one. + if (engines.length > 0 && !fs.existsSync(pkgJsonPath)) { --- End diff -- hmm yes i think that will work! > Auto-create a package.json if it doesn't exist yet > -------------------------------------------------- > > Key: CB-12425 > URL: https://issues.apache.org/jira/browse/CB-12425 > Project: Apache Cordova > Issue Type: Improvement > Components: CordovaLib > Affects Versions: cordova-7 > Reporter: Audrey So > Assignee: Audrey So > Labels: cordova-7.0.0 > > When restoring during cordova prepare, auto-create a package.json if it > doesn't exist yet. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org