-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 79af310
Showing
47 changed files
with
17,815 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Editor configuration, see http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# See http://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# compiled output | ||
/dist | ||
/tmp | ||
/out-tsc | ||
|
||
# dependencies | ||
/node_modules | ||
|
||
# IDEs and editors | ||
/.idea | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# IDE - VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
|
||
# misc | ||
/.sass-cache | ||
/connect.lock | ||
/coverage | ||
/libpeerconnection.log | ||
npm-debug.log | ||
yarn-error.log | ||
testem.log | ||
/typings | ||
|
||
# System Files | ||
.DS_Store | ||
Thumbs.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Add files here to ignore them from prettier formatting | ||
|
||
/dist | ||
/coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"recommendations": [ | ||
"nrwl.angular-console", | ||
"angular.ng-template", | ||
"ms-vscode.vscode-typescript-tslint-plugin", | ||
"esbenp.prettier-vscode" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# Flights | ||
|
||
This project was generated using [Nx](https://nx.dev). | ||
|
||
<p align="center"><img src="https://raw.githubusercontent.com/nrwl/nx/master/nx-logo.png" width="450"></p> | ||
|
||
🔎 **Nx is a set of Extensible Dev Tools for Monorepos.** | ||
|
||
## Quick Start & Documentation | ||
|
||
[Nx Documentation](https://nx.dev/angular) | ||
|
||
[10-minute video showing all Nx features](https://nx.dev/angular/getting-started/what-is-nx) | ||
|
||
[Interactive Tutorial](https://nx.dev/angular/tutorial/01-create-application) | ||
|
||
## Adding capabilities to your workspace | ||
|
||
Nx supports many plugins which add capabilities for developing different types of applications and different tools. | ||
|
||
These capabilities include generating applications, libraries, etc as well as the devtools to test, and build projects as well. | ||
|
||
Below are some plugins which you can add to your workspace: | ||
|
||
- [Angular](https://angular.io) | ||
- `ng add @nrwl/angular` | ||
- [React](https://reactjs.org) | ||
- `ng add @nrwl/react` | ||
- Web (no framework frontends) | ||
- `ng add @nrwl/web` | ||
- [Nest](https://nestjs.com) | ||
- `ng add @nrwl/nest` | ||
- [Express](https://expressjs.com) | ||
- `ng add @nrwl/express` | ||
- [Node](https://nodejs.org) | ||
- `ng add @nrwl/node` | ||
|
||
## Generate an application | ||
|
||
Run `ng g @nrwl/angular:app my-app` to generate an application. | ||
|
||
> You can use any of the plugins above to generate applications as well. | ||
When using Nx, you can create multiple applications and libraries in the same workspace. | ||
|
||
## Generate a library | ||
|
||
Run `ng g @nrwl/angular:lib my-lib` to generate a library. | ||
|
||
> You can also use any of the plugins above to generate libraries as well. | ||
Libraries are sharable across libraries and applications. They can be imported from `@flights/mylib`. | ||
|
||
## Development server | ||
|
||
Run `ng serve my-app` for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files. | ||
|
||
## Code scaffolding | ||
|
||
Run `ng g component my-component --project=my-app` to generate a new component. | ||
|
||
## Build | ||
|
||
Run `ng build my-app` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. | ||
|
||
## Running unit tests | ||
|
||
Run `ng test my-app` to execute the unit tests via [Jest](https://jestjs.io). | ||
|
||
Run `nx affected:test` to execute the unit tests affected by a change. | ||
|
||
## Running end-to-end tests | ||
|
||
Run `ng e2e my-app` to execute the end-to-end tests via [Cypress](https://www.cypress.io). | ||
|
||
Run `nx affected:e2e` to execute the end-to-end tests affected by a change. | ||
|
||
## Understand your workspace | ||
|
||
Run `nx dep-graph` to see a diagram of the dependencies of your projects. | ||
|
||
## Further help | ||
|
||
Visit the [Nx Documentation](https://nx.dev/angular) to learn more. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
{ | ||
"version": 1, | ||
"projects": { | ||
"flights-app": { | ||
"projectType": "application", | ||
"schematics": { | ||
"@nrwl/angular:component": { | ||
"style": "scss" | ||
} | ||
}, | ||
"root": "apps/flights-app", | ||
"sourceRoot": "apps/flights-app/src", | ||
"prefix": "flights", | ||
"architect": { | ||
"build": { | ||
"builder": "@angular-devkit/build-angular:browser", | ||
"options": { | ||
"outputPath": "dist/apps/flights-app", | ||
"index": "apps/flights-app/src/index.html", | ||
"main": "apps/flights-app/src/main.ts", | ||
"polyfills": "apps/flights-app/src/polyfills.ts", | ||
"tsConfig": "apps/flights-app/tsconfig.app.json", | ||
"aot": true, | ||
"assets": [ | ||
"apps/flights-app/src/favicon.ico", | ||
"apps/flights-app/src/assets" | ||
], | ||
"styles": ["apps/flights-app/src/styles.scss"], | ||
"scripts": [] | ||
}, | ||
"configurations": { | ||
"production": { | ||
"fileReplacements": [ | ||
{ | ||
"replace": "apps/flights-app/src/environments/environment.ts", | ||
"with": "apps/flights-app/src/environments/environment.prod.ts" | ||
} | ||
], | ||
"optimization": true, | ||
"outputHashing": "all", | ||
"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-devkit/build-angular:dev-server", | ||
"options": { | ||
"browserTarget": "flights-app:build" | ||
}, | ||
"configurations": { | ||
"production": { | ||
"browserTarget": "flights-app:build:production" | ||
} | ||
} | ||
}, | ||
"extract-i18n": { | ||
"builder": "@angular-devkit/build-angular:extract-i18n", | ||
"options": { | ||
"browserTarget": "flights-app:build" | ||
} | ||
}, | ||
"lint": { | ||
"builder": "@angular-devkit/build-angular:tslint", | ||
"options": { | ||
"tsConfig": [ | ||
"apps/flights-app/tsconfig.app.json", | ||
"apps/flights-app/tsconfig.spec.json" | ||
], | ||
"exclude": ["**/node_modules/**", "!apps/flights-app/**"] | ||
} | ||
}, | ||
"test": { | ||
"builder": "@nrwl/jest:jest", | ||
"options": { | ||
"jestConfig": "apps/flights-app/jest.config.js", | ||
"tsConfig": "apps/flights-app/tsconfig.spec.json", | ||
"passWithNoTests": true, | ||
"setupFile": "apps/flights-app/src/test-setup.ts" | ||
} | ||
} | ||
} | ||
}, | ||
"flights-app-e2e": { | ||
"root": "apps/flights-app-e2e", | ||
"sourceRoot": "apps/flights-app-e2e/src", | ||
"projectType": "application", | ||
"architect": { | ||
"e2e": { | ||
"builder": "@nrwl/cypress:cypress", | ||
"options": { | ||
"cypressConfig": "apps/flights-app-e2e/cypress.json", | ||
"tsConfig": "apps/flights-app-e2e/tsconfig.e2e.json", | ||
"devServerTarget": "flights-app:serve" | ||
}, | ||
"configurations": { | ||
"production": { | ||
"devServerTarget": "flights-app:serve:production" | ||
} | ||
} | ||
}, | ||
"lint": { | ||
"builder": "@angular-devkit/build-angular:tslint", | ||
"options": { | ||
"tsConfig": ["apps/flights-app-e2e/tsconfig.e2e.json"], | ||
"exclude": ["**/node_modules/**", "!apps/flights-app-e2e/**"] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"cli": { | ||
"defaultCollection": "@nrwl/angular" | ||
}, | ||
"schematics": { | ||
"@nrwl/angular:application": { | ||
"unitTestRunner": "jest", | ||
"e2eTestRunner": "cypress" | ||
}, | ||
"@nrwl/angular:library": { | ||
"unitTestRunner": "jest" | ||
} | ||
}, | ||
"defaultProject": "flights-app" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"fileServerFolder": ".", | ||
"fixturesFolder": "./src/fixtures", | ||
"integrationFolder": "./src/integration", | ||
"modifyObstructiveCode": false, | ||
"pluginsFile": "./src/plugins/index", | ||
"supportFile": "./src/support/index.ts", | ||
"video": true, | ||
"videosFolder": "../../dist/cypress/apps/flights-app-e2e/videos", | ||
"screenshotsFolder": "../../dist/cypress/apps/flights-app-e2e/screenshots", | ||
"chromeWebSecurity": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "Using fixtures to represent data", | ||
"email": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { getGreeting } from '../support/app.po'; | ||
|
||
describe('flights-app', () => { | ||
beforeEach(() => cy.visit('/')); | ||
|
||
it('should display welcome message', () => { | ||
// Custom command example, see `../support/commands.ts` file | ||
cy.login('[email protected]', 'myPassword'); | ||
|
||
// Function helper example, see `../support/app.po.ts` file | ||
getGreeting().contains('Welcome to flights-app!'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// *********************************************************** | ||
// This example plugins/index.js can be used to load plugins | ||
// | ||
// You can change the location of this file or turn off loading | ||
// the plugins file with the 'pluginsFile' configuration option. | ||
// | ||
// You can read more here: | ||
// https://on.cypress.io/plugins-guide | ||
// *********************************************************** | ||
|
||
// This function is called when a project is opened or re-opened (e.g. due to | ||
// the project's config changing) | ||
|
||
const { preprocessTypescript } = require('@nrwl/cypress/plugins/preprocessor'); | ||
|
||
module.exports = (on, config) => { | ||
// `on` is used to hook into various events Cypress emits | ||
// `config` is the resolved Cypress config | ||
|
||
// Preprocess Typescript file using Nx helper | ||
on('file:preprocessor', preprocessTypescript(config)); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const getGreeting = () => cy.get('h1'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// *********************************************** | ||
// This example commands.js shows you how to | ||
// create various custom commands and overwrite | ||
// existing commands. | ||
// | ||
// For more comprehensive examples of custom | ||
// commands please read more here: | ||
// https://on.cypress.io/custom-commands | ||
// *********************************************** | ||
// eslint-disable-next-line @typescript-eslint/no-namespace | ||
declare namespace Cypress { | ||
interface Chainable<Subject> { | ||
login(email: string, password: string): void; | ||
} | ||
} | ||
// | ||
// -- This is a parent command -- | ||
Cypress.Commands.add('login', (email, password) => { | ||
console.log('Custom command example: Login', email, password); | ||
}); | ||
// | ||
// -- This is a child command -- | ||
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This is a dual command -- | ||
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This will overwrite an existing command -- | ||
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) |
Oops, something went wrong.