Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Commit 3c5ad5a

Browse files
committed
refactor(nxext): refactor packages
1 parent 1ff5540 commit 3c5ad5a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+310
-496
lines changed

.github/workflows/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ jobs:
3434
# Connect your workspace on nx.app and uncomment this to enable task distribution.
3535
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "build" targets have been requested
3636
- run: pnpm install --no-frozen-lockfile
37-
- uses: nrwl/nx-set-shas@v4
37+
#- uses: nrwl/nx-set-shas@v4
3838
#- run: pnpm exec nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build"
3939

40-
- run: pnpm exec nx-cloud record -- nx format:check
41-
- run: pnpm exec nx affected -t lint test build
40+
#- run: pnpm exec nx-cloud record -- nx format:check
41+
- run: pnpm exec nx affected -t lint test build e2e --base=main --head=HEAD

.prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@
77
/build
88

99
/.nx/cache
10+
11+
1012
pnpm-lock.yaml

docs/docs/ionic-angular/generators.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Skip formatting files.
7070

7171
#### standalone
7272

73-
Default: `false`
73+
Default: `true`
7474

7575
Type: `boolean`
7676

nx.json

-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@
118118
"!{projectRoot}/eslint.config.js"
119119
]
120120
},
121-
"nxCloudAccessToken": "NTlhMGE3ZTYtYjk5OC00Mzc5LWE2ZTAtNzE4ODEzNDY5MjlmfHJlYWQ=",
122121
"parallel": 1,
123122
"pluginsConfig": {
124123
"@nx/js": {

packages/capacitor/package.json

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
{
22
"name": "@nxext/capacitor",
3-
"version": "18.0.4",
3+
"version": "18.0.0",
44
"description": "An Nx plugin for developing cross-platform applications using Capacitor",
5-
"author": {
6-
"name": "Devin Shoemaker",
7-
"email": "[email protected]"
8-
},
95
"homepage": "https://nxext.github.io/nx-extensions-ionic/docs/capacitor/getting-started.html",
106
"repository": {
117
"type": "git",
@@ -28,5 +24,7 @@
2824
"ignore": "^5.3.1",
2925
"tslib": "^2.3.0"
3026
},
31-
"peerDependencies": {}
27+
"peerDependencies": {
28+
"@nx/web": "^18.3.0"
29+
}
3230
}

packages/capacitor/plugin.ts

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/*
2+
export {
3+
createNodes,
4+
PlaywrightPluginOptions,
5+
createDependencies,
6+
} from './src/plugins/plugin';
7+
*/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
xdescribe('Plugin', () => {
2+
beforeEach(() => {});
3+
4+
it('', async () => {});
5+
});

packages/capacitor/src/plugins/plugin.ts

Whitespace-only changes.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const capacitorVersion = '^5.0.3';
1+
export const capacitorVersion = '^6.0.0';

packages/ionic-angular/package.json

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "@nxext/ionic-angular",
3-
"version": "18.0.4",
3+
"version": "18.0.0",
44
"description": "An Nx plugin for developing Ionic React applications and libraries",
55
"author": {
6-
"name": "Devin Shoemaker",
7-
"email": "[email protected]"
6+
"name": "Dominik Pieper",
7+
"email": "[email protected]"
88
},
99
"homepage": "https://nxext.github.io/nx-extensions-ionic/docs/ionic-angular/overview.html",
1010
"repository": {
@@ -25,7 +25,7 @@
2525
"schematics": "./generators.json",
2626
"builders": "./executors.json",
2727
"dependencies": {
28-
"@nxext/capacitor": "^18.0.4",
28+
"@nxext/capacitor": "18.0.0",
2929
"@nx/devkit": "18.3.1",
3030
"@nx/eslint": "18.3.1",
3131
"@nx/angular": "18.3.1",
@@ -34,5 +34,8 @@
3434
"typescript": "5.4.5",
3535
"tslib": "^2.3.0"
3636
},
37-
"peerDependencies": {}
37+
"peerDependencies": {
38+
"@nx/angular": "^18.3.0",
39+
"@nx/eslint": "^18.3.0"
40+
}
3841
}
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
1-
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
21
import { TestBed } from '@angular/core/testing';
3-
2+
import { RouterTestingModule } from '@angular/router/testing';
43
import { AppComponent } from './app.component';
54

65
describe('AppComponent', () => {
7-
8-
beforeEach(async () => {
9-
await TestBed.configureTestingModule({
10-
declarations: [AppComponent],
11-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
12-
}).compileComponents();
13-
});
14-
156
it('should create the app', () => {
7+
TestBed.overrideComponent(AppComponent, {
8+
add: {
9+
imports: [RouterTestingModule]
10+
}
11+
});
1612
const fixture = TestBed.createComponent(AppComponent);
1713
const app = fixture.componentInstance;
1814
expect(app).toBeTruthy();
1915
});
20-
2116
});

packages/ionic-angular/src/generators/application/files/base-standalone/src/app/app.component.ts.template

+4-11
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
import { Component } from '@angular/core';
2-
import {IonicModule} from '@ionic/angular';
2+
import { IonApp, IonRouterOutlet } from '@ionic/angular/standalone';
33

44
@Component({
5-
selector: '<%= prefix %>-root',
5+
selector: 'app-root',
6+
templateUrl: 'app.component.html',
67
standalone: true,
7-
imports: [IonicModule],
8-
template: `
9-
<ion-app>
10-
<ion-router-outlet></ion-router-outlet>
11-
</ion-app>
12-
`,
13-
styles: `
14-
15-
`
8+
imports: [IonApp, IonRouterOutlet],
169
})
1710
export class AppComponent {
1811
constructor() {}

packages/ionic-angular/src/generators/application/files/base-standalone/src/styles.scss.template

+16
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,19 @@
88
* For more information on global stylesheets, visit the documentation:
99
* https://ionicframework.com/docs/layout/global-stylesheets
1010
*/
11+
12+
/* Core CSS required for Ionic components to work properly */
13+
@import "@ionic/angular/css/core.css";
14+
15+
/* Basic CSS for apps built with Ionic */
16+
@import "@ionic/angular/css/normalize.css";
17+
@import "@ionic/angular/css/structure.css";
18+
@import "@ionic/angular/css/typography.css";
19+
@import "@ionic/angular/css/display.css";
20+
21+
/* Optional CSS utils that can be commented out */
22+
@import "@ionic/angular/css/padding.css";
23+
@import "@ionic/angular/css/float-elements.css";
24+
@import "@ionic/angular/css/text-alignment.css";
25+
@import "@ionic/angular/css/text-transformation.css";
26+
@import "@ionic/angular/css/flex-utils.css";

packages/ionic-angular/src/generators/application/files/base-standalone/src/theme/variables.scss.template

+8
Original file line numberDiff line numberDiff line change
@@ -234,3 +234,11 @@
234234
--ion-card-background: #1e1e1e;
235235
}
236236
}
237+
238+
html {
239+
/*
240+
* For more information on dynamic font scaling, visit the documentation:
241+
* https://ionicframework.com/docs/layout/dynamic-font-scaling
242+
*/
243+
--ion-dynamic-font: var(--ion-default-dynamic-font);
244+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { TestBed } from '@angular/core/testing';
2+
import { RouterTestingModule } from '@angular/router/testing';
3+
import { AppComponent } from './app.component';
4+
5+
describe('AppComponent', () => {
6+
it('should create the app', () => {
7+
TestBed.overrideComponent(AppComponent, {
8+
add: {
9+
imports: [RouterTestingModule]
10+
}
11+
});
12+
const fixture = TestBed.createComponent(AppComponent);
13+
const app = fixture.componentInstance;
14+
expect(app).toBeTruthy();
15+
});
16+
});
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1-
import {Component} from '@angular/core';
2-
import {CommonModule} from '@angular/common';
3-
import {IonicModule} from '@ionic/angular';
1+
import { Component } from '@angular/core';
2+
import { IonApp, IonRouterOutlet } from '@ionic/angular/standalone';
43

54
@Component({
65
selector: '<%= prefix %>-root',
6+
templateUrl: 'app.component.html',
77
standalone: true,
8-
imports: [CommonModule, IonicModule],
9-
template: `
10-
<ion-app>
11-
<ion-router-outlet></ion-router-outlet>
12-
</ion-app>
13-
`,
14-
styles: ``
8+
imports: [IonApp, IonRouterOutlet],
159
})
16-
17-
export class AppComponent {}
10+
export class AppComponent {
11+
constructor() {}
12+
}
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
import { ApplicationConfig, importProvidersFrom } from '@angular/core';
2-
import { provideRouter } from '@angular/router';
1+
import { ApplicationConfig } from '@angular/core';
2+
import { RouteReuseStrategy, provideRouter } from '@angular/router';
3+
import { IonicRouteStrategy, provideIonicAngular } from '@ionic/angular/standalone';
4+
35
import { appRoutes } from './app.routes';
4-
import {IonicModule} from '@ionic/angular';
56

67
export const appConfig: ApplicationConfig = {
78
providers: [
8-
provideRouter(appRoutes),
9-
importProvidersFrom(
10-
IonicModule.forRoot()
11-
)
12-
9+
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
10+
provideIonicAngular(),
11+
provideRouter(appRoutes)
1312
],
1413
};
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import { NgModule } from '@angular/core';
2-
import {Routes} from '@angular/router';
1+
import { Routes } from '@angular/router';
32

43
export const appRoutes: Routes = [
54
{
65
path: '',
7-
loadChildren: () => import('./tabs/tabs.routes').then(r => r.routes)
8-
}
6+
loadChildren: () => import('./tabs/tabs.routes').then((m) => m.routes),
7+
},
98
];
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<div id="container">
2+
<strong>{{ name }}</strong>
3+
<p>
4+
Explore
5+
<a
6+
target="_blank"
7+
rel="noopener noreferrer"
8+
href="https://ionicframework.com/docs/components"
9+
>UI Components</a
10+
>
11+
</p>
12+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#container {
2+
text-align: center;
3+
4+
position: absolute;
5+
left: 0;
6+
right: 0;
7+
top: 50%;
8+
transform: translateY(-50%);
9+
}
10+
11+
#container strong {
12+
font-size: 20px;
13+
line-height: 26px;
14+
}
15+
16+
#container p {
17+
font-size: 16px;
18+
line-height: 22px;
19+
20+
color: #8c8c8c;
21+
22+
margin: 0;
23+
}
24+
25+
#container a {
26+
text-decoration: none;
27+
}

packages/ionic-angular/src/generators/application/files/tabs-standalone/src/app/explore-container/explore-container.component.spec.ts.template

-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { ComponentFixture, TestBed } from '@angular/core/testing';
2-
import { IonicModule } from '@ionic/angular';
32

43
import { ExploreContainerComponent } from './explore-container.component';
54

@@ -8,11 +7,6 @@ describe('ExploreContainerComponent', () => {
87
let fixture: ComponentFixture<ExploreContainerComponent>;
98

109
beforeEach(async () => {
11-
await TestBed.configureTestingModule({
12-
declarations: [ExploreContainerComponent],
13-
imports: [IonicModule.forRoot()]
14-
}).compileComponents();
15-
1610
fixture = TestBed.createComponent(ExploreContainerComponent);
1711
component = fixture.componentInstance;
1812
fixture.detectChanges();
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,11 @@
11
import { Component, Input } from '@angular/core';
2-
import {CommonModule} from '@angular/common';
3-
import {FormsModule} from '@angular/forms';
4-
import {IonicModule} from '@ionic/angular';
52

63
@Component({
7-
selector: '<%= prefix %>-explore-container',
4+
selector: 'app-explore-container',
5+
templateUrl: './explore-container.component.html',
6+
styleUrls: ['./explore-container.component.scss'],
87
standalone: true,
9-
imports: [ CommonModule, FormsModule, IonicModule ],
10-
template: `
11-
<div id="container">
12-
<strong>{{ name }}</strong>
13-
<p>Explore <a target="_blank" rel="noopener noreferrer" href="https://ionicframework.com/docs/components">UI Components</a></p>
14-
</div>
15-
`,
16-
styles: `
17-
#container {
18-
text-align: center;
19-
20-
position: absolute;
21-
left: 0;
22-
right: 0;
23-
top: 50%;
24-
transform: translateY(-50%);
25-
}
26-
27-
#container strong {
28-
font-size: 20px;
29-
line-height: 26px;
30-
}
31-
32-
#container p {
33-
font-size: 16px;
34-
line-height: 22px;
35-
36-
color: #8c8c8c;
37-
38-
margin: 0;
39-
}
40-
41-
#container a {
42-
text-decoration: none;
43-
}
44-
`
458
})
469
export class ExploreContainerComponent {
47-
4810
@Input() name?: string;
49-
5011
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<ion-header [translucent]="true">
2+
<ion-toolbar>
3+
<ion-title>
4+
Tab 1
5+
</ion-title>
6+
</ion-toolbar>
7+
</ion-header>
8+
9+
<ion-content [fullscreen]="true">
10+
<ion-header collapse="condense">
11+
<ion-toolbar>
12+
<ion-title size="large">Tab 1</ion-title>
13+
</ion-toolbar>
14+
</ion-header>
15+
16+
<app-explore-container name="Tab 1 page"></app-explore-container>
17+
</ion-content>

packages/ionic-angular/src/generators/application/files/tabs-standalone/src/app/tab1/tab1.page.scss.template

Whitespace-only changes.

0 commit comments

Comments
 (0)