Skip to content

Commit

Permalink
feat(ionic): better clean handling (#228)
Browse files Browse the repository at this point in the history
In my opinion the clean should not clean android & ios directories
Only a prepare android should clean android directory
Only a prepare ios should clean ios directory
  • Loading branch information
pegaltier authored and NathanWalker committed Dec 3, 2020
1 parent 74a0750 commit 17a1a2a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/ionic-angular/src/schematics/application/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ export default function (options: ApplicationOptions) {
] = `npm run clean && npm run clean.${platformApp} && npm run build.${platformApp}`;
scripts[
`prepare.${platformApp}.ios`
] = `npm run prepare.${platformApp} && cd apps/${directory}${options.name} && npm run cap.add.ios`;
] = `npm run prepare.${platformApp} && cd apps/${directory}${options.name} && npx rimraf -- ios && npm run cap.add.ios`;
scripts[
`prepare.${platformApp}.android`
] = `npm run prepare.${platformApp} && cd apps/${directory}${options.name} && npm run cap.add.android`;
] = `npm run prepare.${platformApp} && cd apps/${directory}${options.name} && npx rimraf -- android && npm run cap.add.android`;
scripts[
`open.${platformApp}.ios`
] = `cd apps/${directory}${options.name} && npm run cap.ios`;
Expand All @@ -101,7 +101,7 @@ export default function (options: ApplicationOptions) {
] = `cd apps/${directory}${options.name} && npm run cap.copy`;
scripts[
`clean.${platformApp}`
] = `cd apps/${directory}${options.name} && npx rimraf -- hooks node_modules platforms www plugins ios android package-lock.json && npm i && rimraf -- package-lock.json`;
] = `cd apps/${directory}${options.name} && npx rimraf -- hooks node_modules platforms www plugins package-lock.json && npm i && rimraf -- package-lock.json`;
return updatePackageScripts(tree, scripts);
},
(tree: Tree, context: SchematicContext) => {
Expand Down

0 comments on commit 17a1a2a

Please sign in to comment.