Skip to content

Commit

Permalink
feat: implement single-spa-angular/parcel library to render parcels (
Browse files Browse the repository at this point in the history
  • Loading branch information
arturovt committed Nov 9, 2020
1 parent 34e43b5 commit 23d8f0c
Show file tree
Hide file tree
Showing 49 changed files with 722 additions and 686 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jspm_packages
.node_repl_history

lib
parcel/
*.tgz

dist
Expand Down
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
lib
parcel
node_modules
.gitignore
.prettierignore
Expand Down
71 changes: 71 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,77 @@
}
}
},
"parcel": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "apps/parcel",
"sourceRoot": "apps/parcel/src",
"prefix": "single-spa-angular",
"architect": {
"build": {
"builder": "@angular-builders/custom-webpack:browser",
"options": {
"customWebpackConfig": {
"path": "apps/parcel/webpack.config.ts"
},
"outputPath": "dist/apps/parcel",
"index": "apps/parcel/src/index.html",
"main": "apps/parcel/src/main.single-spa.ts",
"tsConfig": "apps/parcel/tsconfig.app.json",
"aot": true,
"assets": ["apps/parcel/src/favicon.ico", "apps/parcel/src/assets"],
"styles": ["apps/parcel/src/styles.scss"],
"scripts": [],
"allowedCommonJsDependencies": ["react", "react-dom"]
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "apps/parcel/src/environments/environment.ts",
"with": "apps/parcel/src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "none",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
}
}
},
"serve": {
"builder": "@angular-builders/custom-webpack:dev-server",
"options": {
"browserTarget": "parcel:build"
},
"configurations": {
"production": {
"browserTarget": "parcel:build:production"
}
}
}
}
},
"single-spa-angular": {
"projectType": "library",
"root": "libs/single-spa-angular",
Expand Down
62 changes: 0 additions & 62 deletions apps/chat/src/polyfills.ts

This file was deleted.

7 changes: 0 additions & 7 deletions apps/chat/tsconfig.editor.json

This file was deleted.

5 changes: 0 additions & 5 deletions apps/chat/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.editor.json"
}
]
}
62 changes: 0 additions & 62 deletions apps/elements/src/polyfills.ts

This file was deleted.

7 changes: 0 additions & 7 deletions apps/elements/tsconfig.editor.json

This file was deleted.

5 changes: 0 additions & 5 deletions apps/elements/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.editor.json"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
</div>
<div class="navbar-menu">
<div class="navbar-start">
<a class="navbar-item" (click)="route('/shop')">Shop</a>
<a class="navbar-item" (click)="route('/chat')">Chat</a>
<a class="navbar-item" (click)="route('/noop-zone')">Noop zone application</a>
<a class="navbar-item" (click)="route('/elements')">Custom element</a>
<a *ngFor="let link of links" class="navbar-item" (click)="route(link.url)">{{
link.label
}}</a>
</div>
</div>
</nav>
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,29 @@ import { Router } from '@angular/router';
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class PrimaryNavComponent {
links = [
{
label: 'Shop',
url: '/shop',
},
{
label: 'Chat',
url: '/chat',
},
{
label: 'Noop zone application',
url: '/noop-zone',
},
{
label: 'Custom element',
url: '/elements',
},
{
label: 'Angular parcel',
url: '/parcel',
},
];

constructor(private router: Router) {}

route(url: string): void {
Expand Down
62 changes: 0 additions & 62 deletions apps/navbar/src/polyfills.ts

This file was deleted.

7 changes: 0 additions & 7 deletions apps/navbar/tsconfig.editor.json

This file was deleted.

5 changes: 0 additions & 5 deletions apps/navbar/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.editor.json"
}
]
}

0 comments on commit 23d8f0c

Please sign in to comment.