Skip to content

Commit a7bd6be

Browse files
initial commit
0 parents  commit a7bd6be

Some content is hidden

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

51 files changed

+12545
-0
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false

.eslintrc.json

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": ["**/*"],
4+
"plugins": ["@nrwl/nx"],
5+
"overrides": [
6+
{
7+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
8+
"rules": {
9+
"@nrwl/nx/enforce-module-boundaries": [
10+
"error",
11+
{
12+
"enforceBuildableLibDependency": true,
13+
"allow": [],
14+
"depConstraints": [
15+
{
16+
"sourceTag": "*",
17+
"onlyDependOnLibsWithTags": ["*"]
18+
}
19+
]
20+
}
21+
]
22+
}
23+
},
24+
{
25+
"files": ["*.ts", "*.tsx"],
26+
"extends": ["plugin:@nrwl/nx/typescript"],
27+
"rules": {}
28+
},
29+
{
30+
"files": ["*.js", "*.jsx"],
31+
"extends": ["plugin:@nrwl/nx/javascript"],
32+
"rules": {}
33+
}
34+
]
35+
}

.gitignore

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
8+
# dependencies
9+
node_modules
10+
11+
# IDEs and editors
12+
/.idea
13+
.project
14+
.classpath
15+
.c9/
16+
*.launch
17+
.settings/
18+
*.sublime-workspace
19+
20+
# IDE - VSCode
21+
.vscode/*
22+
!.vscode/settings.json
23+
!.vscode/tasks.json
24+
!.vscode/launch.json
25+
!.vscode/extensions.json
26+
27+
# misc
28+
/.sass-cache
29+
/connect.lock
30+
/coverage
31+
/libpeerconnection.log
32+
npm-debug.log
33+
yarn-error.log
34+
testem.log
35+
/typings
36+
37+
# System Files
38+
.DS_Store
39+
Thumbs.db
40+
41+
.angular

.prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Add files here to ignore them from prettier formatting
2+
3+
/dist
4+
/coverage

.prettierrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"singleQuote": true
3+
}

.vscode/extensions.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"recommendations": [
3+
"angular.ng-template",
4+
"nrwl.angular-console",
5+
"esbenp.prettier-vscode",
6+
"firsttris.vscode-jest-runner",
7+
"dbaeumer.vscode-eslint"
8+
]
9+
}

README.md

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
2+
3+
# Analogjs
4+
5+
This project was generated using [Nx](https://nx.dev).
6+
7+
<p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="450"></p>
8+
9+
🔎 **Smart, Fast and Extensible Build System**
10+
11+
## Quick Start & Documentation
12+
13+
[Nx Documentation](https://nx.dev/angular)
14+
15+
[10-minute video showing all Nx features](https://nx.dev/getting-started/intro)
16+
17+
[Interactive Tutorial](https://nx.dev/react-tutorial/01-create-application)
18+
19+
## Adding capabilities to your workspace
20+
21+
Nx supports many plugins which add capabilities for developing different types of applications and different tools.
22+
23+
These capabilities include generating applications, libraries, etc as well as the devtools to test, and build projects as well.
24+
25+
Below are our core plugins:
26+
27+
- [Angular](https://angular.io)
28+
- `ng add @nrwl/angular`
29+
- [React](https://reactjs.org)
30+
- `ng add @nrwl/react`
31+
- Web (no framework frontends)
32+
- `ng add @nrwl/web`
33+
- [Nest](https://nestjs.com)
34+
- `ng add @nrwl/nest`
35+
- [Express](https://expressjs.com)
36+
- `ng add @nrwl/express`
37+
- [Node](https://nodejs.org)
38+
- `ng add @nrwl/node`
39+
40+
There are also many [community plugins](https://nx.dev/community) you could add.
41+
42+
## Generate an application
43+
44+
Run `ng g @nrwl/angular:app my-app` to generate an application.
45+
46+
> You can use any of the plugins above to generate applications as well.
47+
48+
When using Nx, you can create multiple applications and libraries in the same workspace.
49+
50+
## Generate a library
51+
52+
Run `ng g @nrwl/angular:lib my-lib` to generate a library.
53+
54+
> You can also use any of the plugins above to generate libraries as well.
55+
56+
Libraries are shareable across libraries and applications. They can be imported from `@analogjs/mylib`.
57+
58+
## Development server
59+
60+
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.
61+
62+
## Code scaffolding
63+
64+
Run `ng g component my-component --project=my-app` to generate a new component.
65+
66+
## Build
67+
68+
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.
69+
70+
## Running unit tests
71+
72+
Run `ng test my-app` to execute the unit tests via [Jest](https://jestjs.io).
73+
74+
Run `nx affected:test` to execute the unit tests affected by a change.
75+
76+
## Running end-to-end tests
77+
78+
Run `ng e2e my-app` to execute the end-to-end tests via [Cypress](https://www.cypress.io).
79+
80+
Run `nx affected:e2e` to execute the end-to-end tests affected by a change.
81+
82+
## Understand your workspace
83+
84+
Run `nx graph` to see a diagram of the dependencies of your projects.
85+
86+
## Further help
87+
88+
Visit the [Nx Documentation](https://nx.dev/angular) to learn more.
89+
90+
91+
92+
93+
94+
95+
## ☁ Nx Cloud
96+
97+
### Distributed Computation Caching & Distributed Task Execution
98+
99+
<p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-cloud-card.png"></p>
100+
101+
Nx Cloud pairs with Nx in order to enable you to build and test code more rapidly, by up to 10 times. Even teams that are new to Nx can connect to Nx Cloud and start saving time instantly.
102+
103+
Teams using Nx gain the advantage of building full-stack applications with their preferred framework alongside Nx’s advanced code generation and project dependency graph, plus a unified experience for both frontend and backend developers.
104+
105+
Visit [Nx Cloud](https://nx.app/) to learn more.

angular.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"$schema": "./node_modules/nx/schemas/workspace-schema.json",
3+
"version": 2,
4+
"projects": {
5+
"analog-app": "apps/analog-app",
6+
"analog-app-e2e": "apps/analog-app-e2e"
7+
}
8+
}

apps/.gitkeep

Whitespace-only changes.

apps/analog-app-e2e/.eslintrc.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"extends": ["plugin:cypress/recommended", "../../.eslintrc.json"],
3+
"ignorePatterns": ["!**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7+
"rules": {}
8+
},
9+
{
10+
"files": ["src/plugins/index.js"],
11+
"rules": {
12+
"@typescript-eslint/no-var-requires": "off",
13+
"no-undef": "off"
14+
}
15+
}
16+
]
17+
}

apps/analog-app-e2e/cypress.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"fileServerFolder": ".",
3+
"fixturesFolder": "./src/fixtures",
4+
"integrationFolder": "./src/integration",
5+
"modifyObstructiveCode": false,
6+
"supportFile": "./src/support/index.ts",
7+
"pluginsFile": false,
8+
"video": true,
9+
"videosFolder": "../../dist/cypress/apps/analog-app-e2e/videos",
10+
"screenshotsFolder": "../../dist/cypress/apps/analog-app-e2e/screenshots",
11+
"chromeWebSecurity": false
12+
}

apps/analog-app-e2e/project.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
3+
"sourceRoot": "apps/analog-app-e2e/src",
4+
"projectType": "application",
5+
"targets": {
6+
"e2e": {
7+
"executor": "@nrwl/cypress:cypress",
8+
"options": {
9+
"cypressConfig": "apps/analog-app-e2e/cypress.json",
10+
"devServerTarget": "analog-app:serve:development"
11+
},
12+
"configurations": {
13+
"production": {
14+
"devServerTarget": "analog-app:serve:production"
15+
}
16+
}
17+
},
18+
"lint": {
19+
"executor": "@nrwl/linter:eslint",
20+
"outputs": ["{options.outputFile}"],
21+
"options": {
22+
"lintFilePatterns": ["apps/analog-app-e2e/**/*.{js,ts}"]
23+
}
24+
}
25+
},
26+
"tags": [],
27+
"implicitDependencies": ["analog-app"]
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "Using fixtures to represent data",
3+
"email": "[email protected]"
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { getGreeting } from '../support/app.po';
2+
3+
describe('analog-app', () => {
4+
beforeEach(() => cy.visit('/'));
5+
6+
it('should display welcome message', () => {
7+
// Custom command example, see `../support/commands.ts` file
8+
cy.login('[email protected]', 'myPassword');
9+
10+
// Function helper example, see `../support/app.po.ts` file
11+
getGreeting().contains('Welcome analog-app');
12+
});
13+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const getGreeting = () => cy.get('h1');
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// ***********************************************
2+
// This example commands.js shows you how to
3+
// create various custom commands and overwrite
4+
// existing commands.
5+
//
6+
// For more comprehensive examples of custom
7+
// commands please read more here:
8+
// https://on.cypress.io/custom-commands
9+
// ***********************************************
10+
11+
// eslint-disable-next-line @typescript-eslint/no-namespace
12+
declare namespace Cypress {
13+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
14+
interface Chainable<Subject> {
15+
login(email: string, password: string): void;
16+
}
17+
}
18+
//
19+
// -- This is a parent command --
20+
Cypress.Commands.add('login', (email, password) => {
21+
console.log('Custom command example: Login', email, password);
22+
});
23+
//
24+
// -- This is a child command --
25+
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
26+
//
27+
//
28+
// -- This is a dual command --
29+
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
30+
//
31+
//
32+
// -- This will overwrite an existing command --
33+
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// ***********************************************************
2+
// This example support/index.js is processed and
3+
// loaded automatically before your test files.
4+
//
5+
// This is a great place to put global configuration and
6+
// behavior that modifies Cypress.
7+
//
8+
// You can change the location of this file or turn off
9+
// automatically serving support files with the
10+
// 'supportFile' configuration option.
11+
//
12+
// You can read more here:
13+
// https://on.cypress.io/configuration
14+
// ***********************************************************
15+
16+
// Import commands.js using ES2015 syntax:
17+
import './commands';

apps/analog-app-e2e/tsconfig.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"extends": "../../tsconfig.base.json",
3+
"compilerOptions": {
4+
"sourceMap": false,
5+
"outDir": "../../dist/out-tsc",
6+
"allowJs": true,
7+
"types": ["cypress", "node"],
8+
"forceConsistentCasingInFileNames": true,
9+
"strict": true,
10+
"noImplicitOverride": true,
11+
"noPropertyAccessFromIndexSignature": true,
12+
"noImplicitReturns": true,
13+
"noFallthroughCasesInSwitch": true
14+
},
15+
"include": ["src/**/*.ts", "src/**/*.js"],
16+
"angularCompilerOptions": {
17+
"enableI18nLegacyMessageIdFormat": false,
18+
"strictInjectionParameters": true,
19+
"strictInputAccessModifiers": true,
20+
"strictTemplates": true
21+
}
22+
}

apps/analog-app/.browserslistrc

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
# For additional information regarding the format and rule options, please see:
3+
# https://github.com/browserslist/browserslist#queries
4+
5+
# For the full list of supported browsers by the Angular framework, please see:
6+
# https://angular.io/guide/browser-support
7+
8+
# You can see what browsers were selected by your queries by running:
9+
# npx browserslist
10+
11+
last 1 Chrome version
12+
last 1 Firefox version
13+
last 2 Edge major versions
14+
last 2 Safari major versions
15+
last 2 iOS major versions
16+
Firefox ESR

0 commit comments

Comments
 (0)