diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a699d6..c8ed059 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ### Version 1.95 - Support for NextJS projects using static exports with an `out` folder +- Support for Non-Ionic projects using `serve`, `build` and `start` scripts +- Support for Capacitor Plugin monorepos ### Version 1.94 diff --git a/package.json b/package.json index ca06699..49ab91d 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "ionic", "displayName": "Ionic", "description": "Official extension for Ionic and Capacitor development", - "version": "1.94.2", + "version": "1.95.0", "icon": "media/ionic.png", "publisher": "Ionic", "keywords": [ diff --git a/src/ionic-build.ts b/src/ionic-build.ts index 71717fb..10c54e0 100755 --- a/src/ionic-build.ts +++ b/src/ionic-build.ts @@ -110,6 +110,8 @@ function guessBuildCommand(project: Project): string | undefined { const packageFile = JSON.parse(readFileSync(filename, 'utf8')); if (packageFile.scripts['ionic:build']) { return npmRun('ionic:build'); + } else if (packageFile.scripts['build']) { + return npmRun('build'); } } return undefined; diff --git a/src/ionic-serve.ts b/src/ionic-serve.ts index 32928c5..9829fe5 100755 --- a/src/ionic-serve.ts +++ b/src/ionic-serve.ts @@ -124,13 +124,15 @@ function guessServeCommand(project: Project): string | undefined { const packageFile = JSON.parse(readFileSync(filename, 'utf8')); if (packageFile.scripts['ionic:serve']) { return npmRun('ionic:serve'); - } - if (packageFile.scripts?.serve) { + } else if (packageFile.scripts?.serve) { return npmRun('serve'); + } else if (packageFile.scripts?.start) { + return npmRun('start'); } } return undefined; } + async function findNextPort(port: number, host: string | undefined): Promise { let availablePort = port; while (await isPortInUse(availablePort, host)) { diff --git a/src/monorepo.ts b/src/monorepo.ts index adb0650..dc71174 100755 --- a/src/monorepo.ts +++ b/src/monorepo.ts @@ -393,7 +393,11 @@ function checkFolder(filename: string): FolderType { pck?.dependencies?.['@capacitor/android'] || pck?.dependencies?.['@angular/core'] ); - return isIonic ? FolderType.hasIonic : pck.dependencies ? FolderType.hasDependencies : FolderType.unknown; + return isIonic + ? FolderType.hasIonic + : pck.dependencies || pck.devDependencies + ? FolderType.hasDependencies + : FolderType.unknown; } catch { return FolderType.unknown; }