From 5d491d7941c8663dfbdb250e4309392c606b97da Mon Sep 17 00:00:00 2001 From: Uday Vunnam Date: Sun, 19 Jul 2020 22:15:17 +0530 Subject: [PATCH] feat: got demo app to test breadcrumbs --- angular.json | 87 +++++++++++------- .../cypress.json | 4 +- .../src/fixtures/example.json | 0 .../src/integration/app.spec.ts | 4 +- .../src/plugins/index.js | 0 .../src/support/app.po.ts | 0 .../src/support/commands.ts | 0 .../src/support/index.ts | 0 .../tsconfig.e2e.json | 0 .../tsconfig.json | 0 .../tslint.json | 0 apps/{star-wars => got-demo}/browserslist | 0 apps/{star-wars => got-demo}/jest.config.js | 4 +- .../src/app/app.component.css} | 4 + apps/got-demo/src/app/app.component.html | 71 ++++++++++++++ .../src/app/app.component.ts | 6 +- .../src/app/app.module.ts | 0 apps/got-demo/src/app/app.routing.module.ts | 26 ++++++ .../src/app/books/books.component.css} | 0 .../src/app/books/books.component.html | 1 + .../got-demo/src/app/books/books.component.ts | 15 +++ .../app/characters/characters.component.css} | 0 .../app/characters/characters.component.html | 1 + .../app/characters/characters.component.ts | 15 +++ .../src/app/houses/houses.component.css} | 0 .../src/app/houses/houses.component.html | 1 + .../src/app/houses/houses.component.ts | 15 +++ .../src/assets/.gitkeep | 0 .../src/environments/environment.prod.ts | 0 .../src/environments/environment.ts | 0 apps/{star-wars => got-demo}/src/favicon.ico | Bin apps/{star-wars => got-demo}/src/index.html | 4 +- apps/{star-wars => got-demo}/src/main.ts | 0 apps/{star-wars => got-demo}/src/polyfills.ts | 0 .../styles.scss => got-demo/src/styles.css} | 0 .../{star-wars => got-demo}/src/test-setup.ts | 0 .../{star-wars => got-demo}/tsconfig.app.json | 0 apps/{star-wars => got-demo}/tsconfig.json | 0 .../tsconfig.spec.json | 0 apps/got-demo/tslint.json | 10 ++ apps/star-wars/src/app/app.component.html | 35 ------- apps/star-wars/src/app/app.routing.module.ts | 37 -------- .../character-list.component.html | 1 - .../character-list.component.ts | 15 --- .../app/character/character.component.html | 1 - .../src/app/character/character.component.ts | 15 --- .../app/film-list/film-list.component.html | 1 - .../src/app/film-list/film-list.component.ts | 15 --- .../star-wars/src/app/film/film.component.css | 0 .../src/app/film/film.component.html | 1 - apps/star-wars/src/app/film/film.component.ts | 15 --- .../star-wars/src/app/home/home.component.css | 0 .../src/app/home/home.component.html | 1 - apps/star-wars/src/app/home/home.component.ts | 15 --- apps/star-wars/src/app/swapi.service.ts | 9 -- apps/star-wars/tslint.json | 10 -- nx.json | 6 +- 57 files changed, 227 insertions(+), 218 deletions(-) rename apps/{star-wars-e2e => got-demo-e2e}/cypress.json (66%) rename apps/{star-wars-e2e => got-demo-e2e}/src/fixtures/example.json (100%) rename apps/{star-wars-e2e => got-demo-e2e}/src/integration/app.spec.ts (79%) rename apps/{star-wars-e2e => got-demo-e2e}/src/plugins/index.js (100%) rename apps/{star-wars-e2e => got-demo-e2e}/src/support/app.po.ts (100%) rename apps/{star-wars-e2e => got-demo-e2e}/src/support/commands.ts (100%) rename apps/{star-wars-e2e => got-demo-e2e}/src/support/index.ts (100%) rename apps/{star-wars-e2e => got-demo-e2e}/tsconfig.e2e.json (100%) rename apps/{star-wars-e2e => got-demo-e2e}/tsconfig.json (100%) rename apps/{star-wars-e2e => got-demo-e2e}/tslint.json (100%) rename apps/{star-wars => got-demo}/browserslist (100%) rename apps/{star-wars => got-demo}/jest.config.js (78%) rename apps/{star-wars/src/app/app.component.scss => got-demo/src/app/app.component.css} (98%) create mode 100644 apps/got-demo/src/app/app.component.html rename apps/{star-wars => got-demo}/src/app/app.component.ts (58%) rename apps/{star-wars => got-demo}/src/app/app.module.ts (100%) create mode 100644 apps/got-demo/src/app/app.routing.module.ts rename apps/{star-wars/src/app/character-list/character-list.component.css => got-demo/src/app/books/books.component.css} (100%) create mode 100644 apps/got-demo/src/app/books/books.component.html create mode 100644 apps/got-demo/src/app/books/books.component.ts rename apps/{star-wars/src/app/character/character.component.css => got-demo/src/app/characters/characters.component.css} (100%) create mode 100644 apps/got-demo/src/app/characters/characters.component.html create mode 100644 apps/got-demo/src/app/characters/characters.component.ts rename apps/{star-wars/src/app/film-list/film-list.component.css => got-demo/src/app/houses/houses.component.css} (100%) create mode 100644 apps/got-demo/src/app/houses/houses.component.html create mode 100644 apps/got-demo/src/app/houses/houses.component.ts rename apps/{star-wars => got-demo}/src/assets/.gitkeep (100%) rename apps/{star-wars => got-demo}/src/environments/environment.prod.ts (100%) rename apps/{star-wars => got-demo}/src/environments/environment.ts (100%) rename apps/{star-wars => got-demo}/src/favicon.ico (100%) rename apps/{star-wars => got-demo}/src/index.html (83%) rename apps/{star-wars => got-demo}/src/main.ts (100%) rename apps/{star-wars => got-demo}/src/polyfills.ts (100%) rename apps/{star-wars/src/styles.scss => got-demo/src/styles.css} (100%) rename apps/{star-wars => got-demo}/src/test-setup.ts (100%) rename apps/{star-wars => got-demo}/tsconfig.app.json (100%) rename apps/{star-wars => got-demo}/tsconfig.json (100%) rename apps/{star-wars => got-demo}/tsconfig.spec.json (100%) create mode 100644 apps/got-demo/tslint.json delete mode 100644 apps/star-wars/src/app/app.component.html delete mode 100644 apps/star-wars/src/app/app.routing.module.ts delete mode 100644 apps/star-wars/src/app/character-list/character-list.component.html delete mode 100644 apps/star-wars/src/app/character-list/character-list.component.ts delete mode 100644 apps/star-wars/src/app/character/character.component.html delete mode 100644 apps/star-wars/src/app/character/character.component.ts delete mode 100644 apps/star-wars/src/app/film-list/film-list.component.html delete mode 100644 apps/star-wars/src/app/film-list/film-list.component.ts delete mode 100644 apps/star-wars/src/app/film/film.component.css delete mode 100644 apps/star-wars/src/app/film/film.component.html delete mode 100644 apps/star-wars/src/app/film/film.component.ts delete mode 100644 apps/star-wars/src/app/home/home.component.css delete mode 100644 apps/star-wars/src/app/home/home.component.html delete mode 100644 apps/star-wars/src/app/home/home.component.ts delete mode 100644 apps/star-wars/src/app/swapi.service.ts delete mode 100644 apps/star-wars/tslint.json diff --git a/angular.json b/angular.json index d6a1216..4ea009d 100644 --- a/angular.json +++ b/angular.json @@ -167,39 +167,60 @@ }, "schematics": {} }, - "star-wars": { + "got-demo": { "projectType": "application", "schematics": { + "@schematics/angular:interceptor": { + "skipTests": true + }, + "@nrwl/angular:class": { + "skipTests": true + }, "@nrwl/angular:component": { - "style": "scss" + "skipTests": true + }, + "@nrwl/angular:directive": { + "skipTests": true + }, + "@nrwl/angular:guard": { + "skipTests": true + }, + "@nrwl/angular:module": { + "skipTests": true + }, + "@nrwl/angular:pipe": { + "skipTests": true + }, + "@nrwl/angular:service": { + "skipTests": true } }, - "root": "apps/star-wars", - "sourceRoot": "apps/star-wars/src", - "prefix": "", + "root": "apps/got-demo", + "sourceRoot": "apps/got-demo/src", + "prefix": "got", "architect": { "build": { "builder": "@angular-devkit/build-angular:browser", "options": { - "outputPath": "dist/apps/star-wars", - "index": "apps/star-wars/src/index.html", - "main": "apps/star-wars/src/main.ts", - "polyfills": "apps/star-wars/src/polyfills.ts", - "tsConfig": "apps/star-wars/tsconfig.app.json", + "outputPath": "dist/apps/got-demo", + "index": "apps/got-demo/src/index.html", + "main": "apps/got-demo/src/main.ts", + "polyfills": "apps/got-demo/src/polyfills.ts", + "tsConfig": "apps/got-demo/tsconfig.app.json", "aot": true, "assets": [ - "apps/star-wars/src/favicon.ico", - "apps/star-wars/src/assets" + "apps/got-demo/src/favicon.ico", + "apps/got-demo/src/assets" ], - "styles": ["apps/star-wars/src/styles.scss"], + "styles": ["apps/got-demo/src/styles.css"], "scripts": [] }, "configurations": { "production": { "fileReplacements": [ { - "replace": "apps/star-wars/src/environments/environment.ts", - "with": "apps/star-wars/src/environments/environment.prod.ts" + "replace": "apps/got-demo/src/environments/environment.ts", + "with": "apps/got-demo/src/environments/environment.prod.ts" } ], "optimization": true, @@ -228,64 +249,64 @@ "serve": { "builder": "@angular-devkit/build-angular:dev-server", "options": { - "browserTarget": "star-wars:build" + "browserTarget": "got-demo:build" }, "configurations": { "production": { - "browserTarget": "star-wars:build:production" + "browserTarget": "got-demo:build:production" } } }, "extract-i18n": { "builder": "@angular-devkit/build-angular:extract-i18n", "options": { - "browserTarget": "star-wars:build" + "browserTarget": "got-demo:build" } }, "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { "tsConfig": [ - "apps/star-wars/tsconfig.app.json", - "apps/star-wars/tsconfig.spec.json" + "apps/got-demo/tsconfig.app.json", + "apps/got-demo/tsconfig.spec.json" ], - "exclude": ["**/node_modules/**", "!apps/star-wars/**/*"] + "exclude": ["**/node_modules/**", "!apps/got-demo/**/*"] } }, "test": { "builder": "@nrwl/jest:jest", "options": { - "jestConfig": "apps/star-wars/jest.config.js", - "tsConfig": "apps/star-wars/tsconfig.spec.json", + "jestConfig": "apps/got-demo/jest.config.js", + "tsConfig": "apps/got-demo/tsconfig.spec.json", "passWithNoTests": true, - "setupFile": "apps/star-wars/src/test-setup.ts" + "setupFile": "apps/got-demo/src/test-setup.ts" } } } }, - "star-wars-e2e": { - "root": "apps/star-wars-e2e", - "sourceRoot": "apps/star-wars-e2e/src", + "got-demo-e2e": { + "root": "apps/got-demo-e2e", + "sourceRoot": "apps/got-demo-e2e/src", "projectType": "application", "architect": { "e2e": { "builder": "@nrwl/cypress:cypress", "options": { - "cypressConfig": "apps/star-wars-e2e/cypress.json", - "tsConfig": "apps/star-wars-e2e/tsconfig.e2e.json", - "devServerTarget": "star-wars:serve" + "cypressConfig": "apps/got-demo-e2e/cypress.json", + "tsConfig": "apps/got-demo-e2e/tsconfig.e2e.json", + "devServerTarget": "got-demo:serve" }, "configurations": { "production": { - "devServerTarget": "star-wars:serve:production" + "devServerTarget": "got-demo:serve:production" } } }, "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": ["apps/star-wars-e2e/tsconfig.e2e.json"], - "exclude": ["**/node_modules/**", "!apps/star-wars-e2e/**/*"] + "tsConfig": ["apps/got-demo-e2e/tsconfig.e2e.json"], + "exclude": ["**/node_modules/**", "!apps/got-demo-e2e/**/*"] } } } diff --git a/apps/star-wars-e2e/cypress.json b/apps/got-demo-e2e/cypress.json similarity index 66% rename from apps/star-wars-e2e/cypress.json rename to apps/got-demo-e2e/cypress.json index 297729e..d8b254b 100644 --- a/apps/star-wars-e2e/cypress.json +++ b/apps/got-demo-e2e/cypress.json @@ -6,7 +6,7 @@ "pluginsFile": "./src/plugins/index", "supportFile": "./src/support/index.ts", "video": true, - "videosFolder": "../../dist/cypress/apps/star-wars-e2e/videos", - "screenshotsFolder": "../../dist/cypress/apps/star-wars-e2e/screenshots", + "videosFolder": "../../dist/cypress/apps/got-demo-e2e/videos", + "screenshotsFolder": "../../dist/cypress/apps/got-demo-e2e/screenshots", "chromeWebSecurity": false } diff --git a/apps/star-wars-e2e/src/fixtures/example.json b/apps/got-demo-e2e/src/fixtures/example.json similarity index 100% rename from apps/star-wars-e2e/src/fixtures/example.json rename to apps/got-demo-e2e/src/fixtures/example.json diff --git a/apps/star-wars-e2e/src/integration/app.spec.ts b/apps/got-demo-e2e/src/integration/app.spec.ts similarity index 79% rename from apps/star-wars-e2e/src/integration/app.spec.ts rename to apps/got-demo-e2e/src/integration/app.spec.ts index a9f0142..369552e 100644 --- a/apps/star-wars-e2e/src/integration/app.spec.ts +++ b/apps/got-demo-e2e/src/integration/app.spec.ts @@ -1,6 +1,6 @@ import { getGreeting } from '../support/app.po'; -describe('star-wars', () => { +describe('got-demo', () => { beforeEach(() => cy.visit('/')); it('should display welcome message', () => { @@ -8,6 +8,6 @@ describe('star-wars', () => { cy.login('my-email@something.com', 'myPassword'); // Function helper example, see `../support/app.po.ts` file - getGreeting().contains('Welcome to star-wars!'); + getGreeting().contains('Welcome to got-demo!'); }); }); diff --git a/apps/star-wars-e2e/src/plugins/index.js b/apps/got-demo-e2e/src/plugins/index.js similarity index 100% rename from apps/star-wars-e2e/src/plugins/index.js rename to apps/got-demo-e2e/src/plugins/index.js diff --git a/apps/star-wars-e2e/src/support/app.po.ts b/apps/got-demo-e2e/src/support/app.po.ts similarity index 100% rename from apps/star-wars-e2e/src/support/app.po.ts rename to apps/got-demo-e2e/src/support/app.po.ts diff --git a/apps/star-wars-e2e/src/support/commands.ts b/apps/got-demo-e2e/src/support/commands.ts similarity index 100% rename from apps/star-wars-e2e/src/support/commands.ts rename to apps/got-demo-e2e/src/support/commands.ts diff --git a/apps/star-wars-e2e/src/support/index.ts b/apps/got-demo-e2e/src/support/index.ts similarity index 100% rename from apps/star-wars-e2e/src/support/index.ts rename to apps/got-demo-e2e/src/support/index.ts diff --git a/apps/star-wars-e2e/tsconfig.e2e.json b/apps/got-demo-e2e/tsconfig.e2e.json similarity index 100% rename from apps/star-wars-e2e/tsconfig.e2e.json rename to apps/got-demo-e2e/tsconfig.e2e.json diff --git a/apps/star-wars-e2e/tsconfig.json b/apps/got-demo-e2e/tsconfig.json similarity index 100% rename from apps/star-wars-e2e/tsconfig.json rename to apps/got-demo-e2e/tsconfig.json diff --git a/apps/star-wars-e2e/tslint.json b/apps/got-demo-e2e/tslint.json similarity index 100% rename from apps/star-wars-e2e/tslint.json rename to apps/got-demo-e2e/tslint.json diff --git a/apps/star-wars/browserslist b/apps/got-demo/browserslist similarity index 100% rename from apps/star-wars/browserslist rename to apps/got-demo/browserslist diff --git a/apps/star-wars/jest.config.js b/apps/got-demo/jest.config.js similarity index 78% rename from apps/star-wars/jest.config.js rename to apps/got-demo/jest.config.js index 2f5b801..3d7f4d5 100644 --- a/apps/star-wars/jest.config.js +++ b/apps/got-demo/jest.config.js @@ -1,7 +1,7 @@ module.exports = { - name: 'star-wars', + name: 'got-demo', preset: '../../jest.config.js', - coverageDirectory: '../../coverage/apps/star-wars', + coverageDirectory: '../../coverage/apps/got-demo', snapshotSerializers: [ 'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js', 'jest-preset-angular/build/AngularSnapshotSerializer.js', diff --git a/apps/star-wars/src/app/app.component.scss b/apps/got-demo/src/app/app.component.css similarity index 98% rename from apps/star-wars/src/app/app.component.scss rename to apps/got-demo/src/app/app.component.css index 0f1ff11..f222adf 100644 --- a/apps/star-wars/src/app/app.component.scss +++ b/apps/got-demo/src/app/app.component.css @@ -9,6 +9,10 @@ margin: 50px auto; } +.gutter-left { + margin-left: 9px; +} + .col-span-2 { grid-column: span 2; } diff --git a/apps/got-demo/src/app/app.component.html b/apps/got-demo/src/app/app.component.html new file mode 100644 index 0000000..d34ce79 --- /dev/null +++ b/apps/got-demo/src/app/app.component.html @@ -0,0 +1,71 @@ +
+

Welcome to {{ title }}!

+
+
+ +
+ +

Description

+ + + + + + +
+

Next Steps

+

Here are some things you can do with Nx.

+
+ Add UI library +
+# Generate UI lib
+ng g @nrwl/angular:lib ui
+
+# Add a component
+ng g @nrwl/angular:component xyz --project ui
+
+
+ View dependency graph +
nx dep-graph
+
+
+ Run affected commands +
+# see what's been affected by changes
+ng affected:dep-graph
+
+# run tests for current changes
+ng affected:test
+
+# run e2e tests for current changes
+ng affected:e2e
+
+
+
diff --git a/apps/star-wars/src/app/app.component.ts b/apps/got-demo/src/app/app.component.ts similarity index 58% rename from apps/star-wars/src/app/app.component.ts rename to apps/got-demo/src/app/app.component.ts index 8f06bf7..5bc28f9 100644 --- a/apps/star-wars/src/app/app.component.ts +++ b/apps/got-demo/src/app/app.component.ts @@ -1,10 +1,10 @@ import { Component } from '@angular/core'; @Component({ - selector: 'sw-root', + selector: 'got-root', templateUrl: './app.component.html', - styleUrls: ['./app.component.scss'], + styleUrls: ['./app.component.css'], }) export class AppComponent { - title = 'Star Wars'; + title = 'Game Of Thrones'; } diff --git a/apps/star-wars/src/app/app.module.ts b/apps/got-demo/src/app/app.module.ts similarity index 100% rename from apps/star-wars/src/app/app.module.ts rename to apps/got-demo/src/app/app.module.ts diff --git a/apps/got-demo/src/app/app.routing.module.ts b/apps/got-demo/src/app/app.routing.module.ts new file mode 100644 index 0000000..e18d53d --- /dev/null +++ b/apps/got-demo/src/app/app.routing.module.ts @@ -0,0 +1,26 @@ +import { RouterModule, Routes } from "@angular/router"; +import { NgModule } from "@angular/core"; +import { HousesComponent } from './houses/houses.component'; +import { CharactersComponent } from './characters/characters.component'; +import { BooksComponent } from './books/books.component'; + +export const appRoutes: Routes = [ + { + path: "books", + component: BooksComponent, + }, { + path: "characters", + component: CharactersComponent, + }, { + path: "houses", + component: HousesComponent, + } +]; + +@NgModule({ + imports: [RouterModule.forRoot(appRoutes, { initialNavigation: 'enabled' })], + exports: [RouterModule] +}) +export class AppRoutingModule { } + +export const ROUTER_COMPONENTS = [BooksComponent, CharactersComponent, HousesComponent]; diff --git a/apps/star-wars/src/app/character-list/character-list.component.css b/apps/got-demo/src/app/books/books.component.css similarity index 100% rename from apps/star-wars/src/app/character-list/character-list.component.css rename to apps/got-demo/src/app/books/books.component.css diff --git a/apps/got-demo/src/app/books/books.component.html b/apps/got-demo/src/app/books/books.component.html new file mode 100644 index 0000000..c83bc50 --- /dev/null +++ b/apps/got-demo/src/app/books/books.component.html @@ -0,0 +1 @@ +

books works!

diff --git a/apps/got-demo/src/app/books/books.component.ts b/apps/got-demo/src/app/books/books.component.ts new file mode 100644 index 0000000..6a9fe4b --- /dev/null +++ b/apps/got-demo/src/app/books/books.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'got-books', + templateUrl: './books.component.html', + styleUrls: ['./books.component.css'] +}) +export class BooksComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/apps/star-wars/src/app/character/character.component.css b/apps/got-demo/src/app/characters/characters.component.css similarity index 100% rename from apps/star-wars/src/app/character/character.component.css rename to apps/got-demo/src/app/characters/characters.component.css diff --git a/apps/got-demo/src/app/characters/characters.component.html b/apps/got-demo/src/app/characters/characters.component.html new file mode 100644 index 0000000..ead478d --- /dev/null +++ b/apps/got-demo/src/app/characters/characters.component.html @@ -0,0 +1 @@ +

characters works!

diff --git a/apps/got-demo/src/app/characters/characters.component.ts b/apps/got-demo/src/app/characters/characters.component.ts new file mode 100644 index 0000000..9fa183d --- /dev/null +++ b/apps/got-demo/src/app/characters/characters.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'got-characters', + templateUrl: './characters.component.html', + styleUrls: ['./characters.component.css'] +}) +export class CharactersComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/apps/star-wars/src/app/film-list/film-list.component.css b/apps/got-demo/src/app/houses/houses.component.css similarity index 100% rename from apps/star-wars/src/app/film-list/film-list.component.css rename to apps/got-demo/src/app/houses/houses.component.css diff --git a/apps/got-demo/src/app/houses/houses.component.html b/apps/got-demo/src/app/houses/houses.component.html new file mode 100644 index 0000000..94b42e3 --- /dev/null +++ b/apps/got-demo/src/app/houses/houses.component.html @@ -0,0 +1 @@ +

houses works!

diff --git a/apps/got-demo/src/app/houses/houses.component.ts b/apps/got-demo/src/app/houses/houses.component.ts new file mode 100644 index 0000000..ce05c78 --- /dev/null +++ b/apps/got-demo/src/app/houses/houses.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'got-houses', + templateUrl: './houses.component.html', + styleUrls: ['./houses.component.css'] +}) +export class HousesComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/apps/star-wars/src/assets/.gitkeep b/apps/got-demo/src/assets/.gitkeep similarity index 100% rename from apps/star-wars/src/assets/.gitkeep rename to apps/got-demo/src/assets/.gitkeep diff --git a/apps/star-wars/src/environments/environment.prod.ts b/apps/got-demo/src/environments/environment.prod.ts similarity index 100% rename from apps/star-wars/src/environments/environment.prod.ts rename to apps/got-demo/src/environments/environment.prod.ts diff --git a/apps/star-wars/src/environments/environment.ts b/apps/got-demo/src/environments/environment.ts similarity index 100% rename from apps/star-wars/src/environments/environment.ts rename to apps/got-demo/src/environments/environment.ts diff --git a/apps/star-wars/src/favicon.ico b/apps/got-demo/src/favicon.ico similarity index 100% rename from apps/star-wars/src/favicon.ico rename to apps/got-demo/src/favicon.ico diff --git a/apps/star-wars/src/index.html b/apps/got-demo/src/index.html similarity index 83% rename from apps/star-wars/src/index.html rename to apps/got-demo/src/index.html index 1ef44fc..ce33ace 100644 --- a/apps/star-wars/src/index.html +++ b/apps/got-demo/src/index.html @@ -2,12 +2,12 @@ - StarWars + GotDemo - + diff --git a/apps/star-wars/src/main.ts b/apps/got-demo/src/main.ts similarity index 100% rename from apps/star-wars/src/main.ts rename to apps/got-demo/src/main.ts diff --git a/apps/star-wars/src/polyfills.ts b/apps/got-demo/src/polyfills.ts similarity index 100% rename from apps/star-wars/src/polyfills.ts rename to apps/got-demo/src/polyfills.ts diff --git a/apps/star-wars/src/styles.scss b/apps/got-demo/src/styles.css similarity index 100% rename from apps/star-wars/src/styles.scss rename to apps/got-demo/src/styles.css diff --git a/apps/star-wars/src/test-setup.ts b/apps/got-demo/src/test-setup.ts similarity index 100% rename from apps/star-wars/src/test-setup.ts rename to apps/got-demo/src/test-setup.ts diff --git a/apps/star-wars/tsconfig.app.json b/apps/got-demo/tsconfig.app.json similarity index 100% rename from apps/star-wars/tsconfig.app.json rename to apps/got-demo/tsconfig.app.json diff --git a/apps/star-wars/tsconfig.json b/apps/got-demo/tsconfig.json similarity index 100% rename from apps/star-wars/tsconfig.json rename to apps/got-demo/tsconfig.json diff --git a/apps/star-wars/tsconfig.spec.json b/apps/got-demo/tsconfig.spec.json similarity index 100% rename from apps/star-wars/tsconfig.spec.json rename to apps/got-demo/tsconfig.spec.json diff --git a/apps/got-demo/tslint.json b/apps/got-demo/tslint.json new file mode 100644 index 0000000..20bf07a --- /dev/null +++ b/apps/got-demo/tslint.json @@ -0,0 +1,10 @@ +{ + "extends": "../../tslint.json", + "rules": { + "directive-selector": [true, "attribute", "got", "camelCase"], + "component-selector": [true, "element", "got", "kebab-case"] + }, + "linterOptions": { + "exclude": ["!**/*"] + } +} diff --git a/apps/star-wars/src/app/app.component.html b/apps/star-wars/src/app/app.component.html deleted file mode 100644 index ac014e8..0000000 --- a/apps/star-wars/src/app/app.component.html +++ /dev/null @@ -1,35 +0,0 @@ -
-

Welcome to {{ title }}!

-
-
- -
- -

Description

- - diff --git a/apps/star-wars/src/app/app.routing.module.ts b/apps/star-wars/src/app/app.routing.module.ts deleted file mode 100644 index 4809aec..0000000 --- a/apps/star-wars/src/app/app.routing.module.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { RouterModule, Routes } from "@angular/router"; -import { NgModule } from "@angular/core"; -import { FilmListComponent } from './film-list/film-list.component'; -import { FilmComponent } from './film/film.component'; -import { CharacterListComponent } from './character-list/character-list.component'; -import { CharacterComponent } from './character/character.component'; -import { HomeComponent } from './home/home.component'; - - -export const appRoutes: Routes = [ - { - path: '', - pathMatch: 'full', - component: HomeComponent - }, - { - path: "film-list", - component: FilmListComponent, - }, { - path: "film/:filmId", - component: FilmComponent, - }, { - path: "character-list", - component: CharacterListComponent, - }, { - path: "character/:characterId", - component: CharacterComponent, - } -]; - -@NgModule({ - imports: [RouterModule.forRoot(appRoutes, { initialNavigation: 'enabled' })], - exports: [RouterModule] -}) -export class AppRoutingModule { } - -export const ROUTER_COMPONENTS = [FilmListComponent, FilmComponent, CharacterListComponent, CharacterComponent, HomeComponent]; diff --git a/apps/star-wars/src/app/character-list/character-list.component.html b/apps/star-wars/src/app/character-list/character-list.component.html deleted file mode 100644 index 45a2099..0000000 --- a/apps/star-wars/src/app/character-list/character-list.component.html +++ /dev/null @@ -1 +0,0 @@ -

character-list works!

diff --git a/apps/star-wars/src/app/character-list/character-list.component.ts b/apps/star-wars/src/app/character-list/character-list.component.ts deleted file mode 100644 index 6481029..0000000 --- a/apps/star-wars/src/app/character-list/character-list.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'sw-character-list', - templateUrl: './character-list.component.html', - styleUrls: ['./character-list.component.css'] -}) -export class CharacterListComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/apps/star-wars/src/app/character/character.component.html b/apps/star-wars/src/app/character/character.component.html deleted file mode 100644 index f81c690..0000000 --- a/apps/star-wars/src/app/character/character.component.html +++ /dev/null @@ -1 +0,0 @@ -

character works!

diff --git a/apps/star-wars/src/app/character/character.component.ts b/apps/star-wars/src/app/character/character.component.ts deleted file mode 100644 index 8281233..0000000 --- a/apps/star-wars/src/app/character/character.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'sw-character', - templateUrl: './character.component.html', - styleUrls: ['./character.component.css'] -}) -export class CharacterComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/apps/star-wars/src/app/film-list/film-list.component.html b/apps/star-wars/src/app/film-list/film-list.component.html deleted file mode 100644 index 6311bbc..0000000 --- a/apps/star-wars/src/app/film-list/film-list.component.html +++ /dev/null @@ -1 +0,0 @@ -

film-list works!

diff --git a/apps/star-wars/src/app/film-list/film-list.component.ts b/apps/star-wars/src/app/film-list/film-list.component.ts deleted file mode 100644 index 9126cf7..0000000 --- a/apps/star-wars/src/app/film-list/film-list.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'sw-film-list', - templateUrl: './film-list.component.html', - styleUrls: ['./film-list.component.css'] -}) -export class FilmListComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/apps/star-wars/src/app/film/film.component.css b/apps/star-wars/src/app/film/film.component.css deleted file mode 100644 index e69de29..0000000 diff --git a/apps/star-wars/src/app/film/film.component.html b/apps/star-wars/src/app/film/film.component.html deleted file mode 100644 index 83265d5..0000000 --- a/apps/star-wars/src/app/film/film.component.html +++ /dev/null @@ -1 +0,0 @@ -

film works!

diff --git a/apps/star-wars/src/app/film/film.component.ts b/apps/star-wars/src/app/film/film.component.ts deleted file mode 100644 index ce4e796..0000000 --- a/apps/star-wars/src/app/film/film.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'sw-film', - templateUrl: './film.component.html', - styleUrls: ['./film.component.css'] -}) -export class FilmComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/apps/star-wars/src/app/home/home.component.css b/apps/star-wars/src/app/home/home.component.css deleted file mode 100644 index e69de29..0000000 diff --git a/apps/star-wars/src/app/home/home.component.html b/apps/star-wars/src/app/home/home.component.html deleted file mode 100644 index 5f2c53f..0000000 --- a/apps/star-wars/src/app/home/home.component.html +++ /dev/null @@ -1 +0,0 @@ -

home works!

diff --git a/apps/star-wars/src/app/home/home.component.ts b/apps/star-wars/src/app/home/home.component.ts deleted file mode 100644 index d36e5ac..0000000 --- a/apps/star-wars/src/app/home/home.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'home', - templateUrl: './home.component.html', - styleUrls: ['./home.component.css'] -}) -export class HomeComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/apps/star-wars/src/app/swapi.service.ts b/apps/star-wars/src/app/swapi.service.ts deleted file mode 100644 index d5df2b3..0000000 --- a/apps/star-wars/src/app/swapi.service.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'root' -}) -export class SwapiService { - - constructor() { } -} diff --git a/apps/star-wars/tslint.json b/apps/star-wars/tslint.json deleted file mode 100644 index 5a92391..0000000 --- a/apps/star-wars/tslint.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../tslint.json", - "rules": { - "directive-selector": [true, "attribute", "sw", "camelCase"], - "component-selector": [true, "element", "sw", "kebab-case"] - }, - "linterOptions": { - "exclude": ["!**/*"] - } -} diff --git a/nx.json b/nx.json index e3cdb3c..5f080df 100644 --- a/nx.json +++ b/nx.json @@ -32,12 +32,12 @@ "xng-breadcrumb": { "tags": ["xng-breadcrumb"] }, - "star-wars": { + "got-demo": { "tags": [] }, - "star-wars-e2e": { + "got-demo-e2e": { "tags": [], - "implicitDependencies": ["star-wars"] + "implicitDependencies": ["got-demo"] } } }