Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: parameter passing, folder based mono repos #208

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading