Skip to content

Commit

Permalink
fix: parameter passing, folder based mono repos (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
dtarnawsky authored Oct 18, 2024
1 parent 61f3abc commit 543264e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Changelog

### Version 1.96

- For build command use `--` to ensure parameters are passed
- Support for folder based monorepos with Non-Ionic projects

### Version 1.95

- Support for NextJS projects using static exports with an `out` folder
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ionic",
"displayName": "Ionic",
"description": "Official extension for Ionic and Capacitor development",
"version": "1.95.0",
"version": "1.96.0",
"icon": "media/ionic.png",
"publisher": "Ionic",
"keywords": [
Expand Down
6 changes: 6 additions & 0 deletions src/ionic-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ function build(
): string {
let cmd = `${npx(project)} ${buildCmd(project)}`;
if (configurationArg) {
if (cmd.includes('npm run ')) {
// This adds -- if the command is npm run build but does not if it is something like ng build
cmd += ' -- --';
} else if (cmd.includes('run ')) {
cmd += ' --';
}
cmd += ` ${configurationArg}`;
} else if (prod) {
cmd += ' --prod';
Expand Down
6 changes: 2 additions & 4 deletions src/monorepo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,10 @@ function getFolderBasedProjects(prj: Project): Array<MonoRepoProject> {
likelyFolderBasedMonoRepo = true;
}
}
if (!likelyFolderBasedMonoRepo) {
return [];
}

const rootFolderType = checkFolder(join(prj.folder, 'package.json'));
if (rootFolderType == FolderType.hasIonic) {
if (prj.folder == projects[0].path) {
if (projects.length == 0 || prj.folder == projects[0].path) {
// Sub folder is the root folder (eg ionic multi-app without a root)
} else {
// Its definitely an Ionic or Capacitor project in the root but we have sub folders that look like Ionic projects so throw error
Expand Down

0 comments on commit 543264e

Please sign in to comment.