Skip to content

Commit

Permalink
Improved piral-ng
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianRappl committed Sep 26, 2023
1 parent 9c3f177 commit ea22bb3
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 892 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Fixed issue with global installation in pnpm (#624)
- Fixed issue with `v.x` notation in semver comparisons
- Updated `piral-ng/common` to use Angular-version specific package `piral-ng-common`
- Added support for features of v9 of Piral.Blazor in `piral-blazor` (#626)

## 1.2.0 (August 28, 2023)
Expand Down
128 changes: 2 additions & 126 deletions src/converters/piral-ng/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ module.exports = (config) => {
esModule: false,
},
};

const ruleIndex = config.module.rules.findIndex(m => m.test.toString() === /\.tsx?$/i.toString());

config.module.rules.splice(ruleIndex, 1,
Expand Down Expand Up @@ -510,131 +510,7 @@ If you still need to use `templateUrl` (or `styleUrls`) then take a look below a

## Angular Versions

This plugin works with all versions of Angular (right now 2 - 12). Support for Angular.js (also known as Angular 1) is given via `piral-ngjs`.

### Angular 2

Angular 2 works with some configuration (see below) even though the usage of annotations (internally) is slightly different in `piral-ng`.

The basic dependencies look as follows:

```json
{
"@angular/common": "^2",
"@angular/compiler": "^2",
"@angular/core": "^2",
"@angular/router": "^2",
"@angular/platform-browser": "^2",
"@angular/platform-browser-dynamic": "^2",
"core-js": "^3.15.2",
"rxjs": "^5.0",
"zone.js": "~0.9"
}
```

### Angular 3

Was never released. Not covered.

### Angular 4

Angular 4 works even though the usage of annotations (internally) is slightly different in `piral-ng`.

The basic dependencies look as follows:

```json
{
"@angular/common": "^4",
"@angular/compiler": "^4",
"@angular/core": "^4",
"@angular/router": "^4",
"@angular/platform-browser": "^4",
"@angular/platform-browser-dynamic": "^4",
"core-js": "^3.15.2",
"rxjs": "^5.0.0",
"zone.js": "~0.9"
}
```

### Angular 5

In general, Angular 5 seems to work.

The basic dependencies look as follows:

```json
{
"@angular/common": "^5",
"@angular/compiler": "^5",
"@angular/core": "^5",
"@angular/router": "^5",
"@angular/platform-browser": "^5",
"@angular/platform-browser-dynamic": "^5",
"core-js": "^3.15.2",
"rxjs": "^5.0.0",
"zone.js": "~0.9"
}
```

### Angular 6

In general, Angular 6 seems to work.

The basic dependencies look as follows:

```json
{
"@angular/common": "^6",
"@angular/compiler": "^6",
"@angular/core": "^6",
"@angular/router": "^6",
"@angular/platform-browser": "^6",
"@angular/platform-browser-dynamic": "^6",
"core-js": "^3.15.2",
"rxjs": "^6.0.0",
"zone.js": "~0.9"
}
```

### Angular 7

In general, Angular 7 seems to work.

The basic dependencies look as follows:

```json
{
"@angular/common": "^7",
"@angular/compiler": "^7",
"@angular/core": "^7",
"@angular/router": "^7",
"@angular/platform-browser": "^7",
"@angular/platform-browser-dynamic": "^7",
"core-js": "^3.15.2",
"rxjs": "^6.4",
"zone.js": "~0.9"
}
```

### Angular 8

In general, Angular 8 seems to work and is **supported**.

The basic dependencies look as follows:

```json
{
"@angular/common": "^8",
"@angular/compiler": "^8",
"@angular/core": "^8",
"@angular/router": "^8",
"@angular/platform-browser": "^8",
"@angular/platform-browser-dynamic": "^8",
"core-js": "^3.15.2",
"rxjs": "^6.4",
"zone.js": "~0.9"
}
```
This plugin works with recent versions of Angular (right now 9 - 16). Support for Angular.js (also known as Angular 1) is given via `piral-ngjs`.

### Angular 9

Expand Down
1 change: 1 addition & 0 deletions src/converters/piral-ng/common.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from 'piral-ng-common';
10 changes: 6 additions & 4 deletions src/converters/piral-ng/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"require": "./lib/index.js"
},
"./common": {
"import": "./common"
"import": "./common.js"
},
"./convert": {
"import": "./convert.js"
Expand Down Expand Up @@ -64,14 +64,16 @@
},
"scripts": {
"cleanup": "rimraf common esm lib convert.d.ts convert.js",
"build": "yarn build:ng && yarn build:commonjs && yarn build:esnext && yarn build:convert",
"build:ng": "ng-packagr -p src/common/ng-package.json",
"build": "yarn build:commonjs && yarn build:esnext && yarn build:convert",
"build:convert": "tsc convert.ts --skipLibCheck --declaration --module esnext",
"build:commonjs": "tsc --project tsconfig.json --outDir lib --module commonjs",
"build:esnext": "tsc --project tsconfig.json --outDir esm --module esnext",
"typedoc": "typedoc --json ../../../docs/types/piral-ng.json src --exclude \"src/**/*.test.*\"",
"test": "echo \"Error: run tests from root\" && exit 1"
},
"peerDependencies": {
"piral-ng-common": "*"
},
"devDependencies": {
"@angular/common": "^16.0.0",
"@angular/compiler": "^16.0.0",
Expand All @@ -80,8 +82,8 @@
"@angular/platform-browser": "^16.0.0",
"@angular/platform-browser-dynamic": "^16.0.0",
"@angular/router": "^16.0.0",
"ng-packagr": "^16.0.0",
"piral-core": "^1.2.0",
"piral-ng-common": "^16.0.0",
"rxjs": "^7.3.0"
}
}
33 changes: 0 additions & 33 deletions src/converters/piral-ng/src/common/NgExtension.ts

This file was deleted.

12 changes: 0 additions & 12 deletions src/converters/piral-ng/src/common/ResourceUrlPipe.ts

This file was deleted.

18 changes: 0 additions & 18 deletions src/converters/piral-ng/src/common/SharedModule.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/converters/piral-ng/src/common/index.d.ts

This file was deleted.

11 changes: 0 additions & 11 deletions src/converters/piral-ng/src/common/ng-package.json

This file was deleted.

19 changes: 0 additions & 19 deletions src/converters/piral-ng/src/common/package.json

This file was deleted.

3 changes: 0 additions & 3 deletions src/converters/piral-ng/src/common/piral-ng-common.js

This file was deleted.

3 changes: 0 additions & 3 deletions src/converters/piral-ng/src/common/public_api.ts

This file was deleted.

Loading

0 comments on commit ea22bb3

Please sign in to comment.