Skip to content

Commit bf5a36d

Browse files
Merge branch 'main' into main
2 parents 1b3ad7e + a5f6eea commit bf5a36d

Some content is hidden

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

67 files changed

+7308
-4532
lines changed

.eslintrc.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
"enforceBuildableLibDependency": true,
1313
"allow": [],
1414
"depConstraints": [
15-
{ "sourceTag": "*", "onlyDependOnLibsWithTags": ["*"] }
15+
{
16+
"sourceTag": "*",
17+
"onlyDependOnLibsWithTags": ["*"]
18+
}
1619
]
1720
}
1821
]

angular.json

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,160 @@
136136
}
137137
}
138138
}
139+
},
140+
"mf-tools": {
141+
"projectType": "library",
142+
"root": "libs/mf-tools",
143+
"sourceRoot": "libs/mf-tools/src",
144+
"prefix": "angular-architects",
145+
"architect": {
146+
"build": {
147+
"builder": "@nrwl/angular:package",
148+
"options": {
149+
"tsConfig": "libs/mf-tools/tsconfig.lib.json",
150+
"project": "libs/mf-tools/ng-package.json"
151+
},
152+
"configurations": {
153+
"production": {
154+
"tsConfig": "libs/mf-tools/tsconfig.lib.prod.json"
155+
}
156+
}
157+
},
158+
"lint": {
159+
"builder": "@nrwl/linter:eslint",
160+
"options": {
161+
"lintFilePatterns": [
162+
"libs/mf-tools/src/**/*.ts",
163+
"libs/mf-tools/src/**/*.html"
164+
]
165+
}
166+
},
167+
"test": {
168+
"builder": "@nrwl/jest:jest",
169+
"outputs": ["coverage/libs/mf-tools"],
170+
"options": {
171+
"jestConfig": "libs/mf-tools/jest.config.js",
172+
"passWithNoTests": true
173+
}
174+
}
175+
}
176+
},
177+
"playground": {
178+
"projectType": "application",
179+
"root": "apps/playground",
180+
"sourceRoot": "apps/playground/src",
181+
"prefix": "angular-architects",
182+
"architect": {
183+
"build": {
184+
"builder": "@angular-devkit/build-angular:browser",
185+
"options": {
186+
"outputPath": "dist/apps/playground",
187+
"index": "apps/playground/src/index.html",
188+
"main": "apps/playground/src/main.ts",
189+
"polyfills": "apps/playground/src/polyfills.ts",
190+
"tsConfig": "apps/playground/tsconfig.app.json",
191+
"assets": [
192+
"apps/playground/src/favicon.ico",
193+
"apps/playground/src/assets"
194+
],
195+
"styles": ["apps/playground/src/styles.css"],
196+
"scripts": []
197+
},
198+
"configurations": {
199+
"production": {
200+
"budgets": [
201+
{
202+
"type": "initial",
203+
"maximumWarning": "500kb",
204+
"maximumError": "1mb"
205+
},
206+
{
207+
"type": "anyComponentStyle",
208+
"maximumWarning": "2kb",
209+
"maximumError": "4kb"
210+
}
211+
],
212+
"fileReplacements": [
213+
{
214+
"replace": "apps/playground/src/environments/environment.ts",
215+
"with": "apps/playground/src/environments/environment.prod.ts"
216+
}
217+
],
218+
"outputHashing": "all"
219+
},
220+
"development": {
221+
"buildOptimizer": false,
222+
"optimization": false,
223+
"vendorChunk": true,
224+
"extractLicenses": false,
225+
"sourceMap": true,
226+
"namedChunks": true
227+
}
228+
},
229+
"defaultConfiguration": "production"
230+
},
231+
"serve": {
232+
"builder": "@angular-devkit/build-angular:dev-server",
233+
"configurations": {
234+
"production": {
235+
"browserTarget": "playground:build:production"
236+
},
237+
"development": {
238+
"browserTarget": "playground:build:development"
239+
}
240+
},
241+
"defaultConfiguration": "development"
242+
},
243+
"extract-i18n": {
244+
"builder": "@angular-devkit/build-angular:extract-i18n",
245+
"options": {
246+
"browserTarget": "playground:build"
247+
}
248+
},
249+
"lint": {
250+
"builder": "@nrwl/linter:eslint",
251+
"options": {
252+
"lintFilePatterns": [
253+
"apps/playground/src/**/*.ts",
254+
"apps/playground/src/**/*.html"
255+
]
256+
}
257+
},
258+
"test": {
259+
"builder": "@nrwl/jest:jest",
260+
"outputs": ["coverage/apps/playground"],
261+
"options": {
262+
"jestConfig": "apps/playground/jest.config.js",
263+
"passWithNoTests": true
264+
}
265+
}
266+
}
267+
},
268+
"playground-e2e": {
269+
"root": "apps/playground-e2e",
270+
"sourceRoot": "apps/playground-e2e/src",
271+
"projectType": "application",
272+
"architect": {
273+
"e2e": {
274+
"builder": "@nrwl/cypress:cypress",
275+
"options": {
276+
"cypressConfig": "apps/playground-e2e/cypress.json",
277+
"tsConfig": "apps/playground-e2e/tsconfig.e2e.json",
278+
"devServerTarget": "playground:serve:development"
279+
},
280+
"configurations": {
281+
"production": {
282+
"devServerTarget": "playground:serve:production"
283+
}
284+
}
285+
},
286+
"lint": {
287+
"builder": "@nrwl/linter:eslint",
288+
"options": {
289+
"lintFilePatterns": ["apps/playground-e2e/**/*.{js,ts}"]
290+
}
291+
}
292+
}
139293
}
140294
}
141295
}

apps/playground-e2e/.eslintrc.json

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

apps/playground-e2e/cypress.json

Lines changed: 12 additions & 0 deletions
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+
"pluginsFile": "./src/plugins/index",
7+
"supportFile": "./src/support/index.ts",
8+
"video": true,
9+
"videosFolder": "../../dist/cypress/apps/playground-e2e/videos",
10+
"screenshotsFolder": "../../dist/cypress/apps/playground-e2e/screenshots",
11+
"chromeWebSecurity": false
12+
}
Lines changed: 4 additions & 0 deletions
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+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { getGreeting } from '../support/app.po';
2+
3+
describe('playground', () => {
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 to playground!');
12+
});
13+
});
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// ***********************************************************
2+
// This example plugins/index.js can be used to load plugins
3+
//
4+
// You can change the location of this file or turn off loading
5+
// the plugins file with the 'pluginsFile' configuration option.
6+
//
7+
// You can read more here:
8+
// https://on.cypress.io/plugins-guide
9+
// ***********************************************************
10+
11+
// This function is called when a project is opened or re-opened (e.g. due to
12+
// the project's config changing)
13+
14+
const { preprocessTypescript } = require('@nrwl/cypress/plugins/preprocessor');
15+
16+
module.exports = (on, config) => {
17+
// `on` is used to hook into various events Cypress emits
18+
// `config` is the resolved Cypress config
19+
20+
// Preprocess Typescript file using Nx helper
21+
on('file:preprocessor', preprocessTypescript(config));
22+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const getGreeting = () => cy.get('h1');
Lines changed: 33 additions & 0 deletions
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) => { ... })
Lines changed: 17 additions & 0 deletions
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';

0 commit comments

Comments
 (0)