Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

Commit

Permalink
fix(ionic-angular): support --directory with Capacitor projects (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
devinshoemaker authored Jan 5, 2021
1 parent 59d174f commit 60a0db8
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
4 changes: 4 additions & 0 deletions apps/docs/blog/draft/2020-12-02-nxtend-11.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ I hope the users of this plugin will understand this decision. Removing function
- add additional Ionic starter templates to application schematic
- support `none` as a unit test and e2e config for the application schematic

## Bug Fixes

- fix generating an application in a sub-directory with Capacitor enabled

# Capacitor

## Features
Expand Down
4 changes: 4 additions & 0 deletions packages/ionic-angular/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
- add additional Ionic starter templates to application schematic
- support `none` as a unit test and e2e config for the application schematic

## Bug Fixes

- fix generating an application in a sub-directory with Capacitor enabled

# 1.1.0

## Features
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function generateCapacitorProject(options: NormalizedSchema): Rule {

return options.capacitor
? externalSchematic('@nxtend/capacitor', 'capacitor-project', {
project: options.name,
project: options.projectName,
appName: options.appName,
appId: 'io.ionic.starter',
npmClient,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,20 @@ describe('application schematic', () => {

expect(tree.exists('apps/my-dir/my-app/src/main.ts'));
});

it('should generate Capacitor project', async () => {
const tree = await testRunner
.runSchematicAsync(
'application',
{ ...options, directory: 'my-dir', capacitor: true },
appTree
)
.toPromise();

expect(
readJsonInTree(tree, `apps/my-dir/my-app/capacitor.config.json`)
).toBeDefined();
});
});

describe('--unitTestRunner', () => {
Expand Down

0 comments on commit 60a0db8

Please sign in to comment.