Skip to content

Commit 1f50614

Browse files
authored
add: vite & typescript samples to index (#2743)
1 parent aa0554a commit 1f50614

File tree

17 files changed

+66
-21
lines changed

17 files changed

+66
-21
lines changed

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,21 @@
9696
"./version-discrepancy/*",
9797
"./vite-react-microfrontends",
9898
"./vite-react-microfrontends/*",
99+
"./vite-react-simple",
100+
"./vite-react-simple/*",
99101
"./vite-svelte-microfrontends",
100102
"./vite-svelte-microfrontends/*",
103+
"./vite-vue-microfrontends",
104+
"./vite-vue-microfrontends/*",
101105
"./vue2-in-vue3",
102106
"./vue2-in-vue3/*",
103107
"./vue3-demo-federation-with-vite",
104108
"./vue3-demo-federation-with-vite/*",
105109
"./vue3-demo",
106110
"./vue3-demo/*",
111+
"./third-party-scripts",
107112
"./third-party-scripts/*",
113+
"./typescript",
108114
"./typescript/*",
109115
"./nextjs-sidecar/*",
110116
"./dashboard-example/*",

third-party-scripts/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,11 @@ This will build and serve `app1` on port 3001
1313
- [localhost:3001](http://localhost:3001/) (HOST)
1414

1515
<img src="https://ssl.google-analytics.com/collect?v=1&t=event&ec=email&ea=open&t=event&tid=UA-120967034-1&z=1589682154&cid=ae045149-9d17-0367-bbb0-11c41d92b411&dt=ModuleFederationExamples&dp=/email/BasicRemoteHost">
16+
17+
# Running Cypress E2E Tests
18+
19+
To run tests in interactive mode, run `npm run cypress:debug` from the root directory of the project. It will open Cypress Test Runner and allow to run tests in interactive mode. [More info about "How to run tests"](../../cypress/README.md#how-to-run-tests)
20+
21+
To build app and run test in headless mode, run `yarn e2e:ci`. It will build app and run tests for this workspace in headless mode. If tets failed cypress will create `cypress` directory in sample root folder with screenshots and videos.
22+
23+
["Best Practices, Rules amd more interesting information here](../../cypress/README.md)

third-party-scripts/app1/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@third-party-scripts/app1",
2+
"name": "third-party-scripts_app1",
33
"version": "0.0.0",
44
"private": true,
55
"devDependencies": {

third-party-scripts/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
},
1010
"version": "0.0.0",
1111
"scripts": {
12-
"start": "lerna run --parallel start",
12+
"start": "lerna run --scope=third-party-scripts_* --parallel start",
1313
"build": "lerna run build",
14-
"serve": "lerna run --parallel serve",
15-
"clean": "lerna run --parallel clean"
14+
"serve": "lerna run --scope=third-party-scripts_* --parallel serve",
15+
"clean": "lerna run --scope=third-party-scripts_* --parallel clean",
16+
"e2e:ci": "yarn start & wait-on http-get://localhost:3001/ && npx cypress run --config-file ../cypress/config/cypress.config.ts --config '{\"supportFile\": \"../cypress/support/e2e.ts\"}' --spec \"./e2e/tests/*.cy.ts\" --browser=chrome"
1617
},
1718
"devDependencies": {
1819
"lerna": "3.22.1"

typescript/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,11 @@ Run `yarn start`. This will build and serve both `app1` and `app2` on ports 3001
1616
- [localhost:3002](http://localhost:3002/)
1717

1818
<img src="https://ssl.google-analytics.com/collect?v=1&t=event&ec=email&ea=open&t=event&tid=UA-120967034-1&z=1589682154&cid=ae045149-9d17-0367-bbb0-11c41d92b411&dt=ModuleFederationExamples&dp=/email/TypeScript">
19+
20+
# Running Cypress E2E Tests
21+
22+
To run tests in interactive mode, run `npm run cypress:debug` from the root directory of the project. It will open Cypress Test Runner and allow to run tests in interactive mode. [More info about "How to run tests"](../../cypress/README.md#how-to-run-tests)
23+
24+
To build app and run test in headless mode, run `yarn e2e:ci`. It will build app and run tests for this workspace in headless mode. If tets failed cypress will create `cypress` directory in sample root folder with screenshots and videos.
25+
26+
["Best Practices, Rules amd more interesting information here](../../cypress/README.md)

typescript/app1/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@typescript/app1",
2+
"name": "typescript_app1",
33
"version": "0.0.0",
44
"private": true,
55
"devDependencies": {

typescript/app2/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@typescript/app2",
2+
"name": "typescript_app2",
33
"version": "0.0.0",
44
"private": true,
55
"devDependencies": {

typescript/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77
],
88
"version": "0.0.0",
99
"scripts": {
10-
"start": "lerna run --scope @typescript/* --parallel start",
11-
"build": "lerna run --scope @typescript/* build",
12-
"serve": "lerna run --scope @typescript/* --parallel serve",
13-
"clean": "lerna run --scope @typescript/* --parallel clean"
10+
"start": "lerna run --scope=typescript_* --parallel start",
11+
"build": "lerna run --scope=typescript_* build",
12+
"serve": "lerna run --scope=typescript_* --parallel serve",
13+
"clean": "lerna run --scope=typescript_* --parallel clean",
14+
"e2e:ci": "yarn start & wait-on http-get://localhost:3001/ && npx cypress run --config-file ../cypress/config/cypress.config.ts --config '{\"supportFile\": \"../cypress/support/e2e.ts\"}' --spec \"./e2e/tests/*.cy.ts\" --browser=chrome"
1415
},
1516
"devDependencies": {
1617
"lerna": "3.22.1"

vite-react-simple/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,12 @@ yarn start
99

1010
```
1111
http://localhost:3000
12-
```
12+
```
13+
14+
# Running Cypress E2E Tests
15+
16+
To run tests in interactive mode, run `npm run cypress:debug` from the root directory of the project. It will open Cypress Test Runner and allow to run tests in interactive mode. [More info about "How to run tests"](../../cypress/README.md#how-to-run-tests)
17+
18+
To build app and run test in headless mode, run `yarn e2e:ci`. It will build app and run tests for this workspace in headless mode. If tets failed cypress will create `cypress` directory in sample root folder with screenshots and videos.
19+
20+
["Best Practices, Rules amd more interesting information here](../../cypress/README.md)

vite-react-simple/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
],
99
"version": "0.0.0",
1010
"scripts": {
11-
"start": "concurrently \"yarn --cwd vite-react start\" \"yarn --cwd webpack-spa start\" \"cd rs-sidecart; yarn start\""
11+
"start": "concurrently \"yarn --cwd vite-react start\" \"yarn --cwd webpack-spa start\" \"cd rs-sidecart; yarn start\"",
12+
"e2e:ci": "yarn start & wait-on http-get://localhost:3000/ && npx cypress run --config-file ../cypress/config/cypress.config.ts --config '{\"supportFile\": \"../cypress/support/e2e.ts\"}' --spec \"./e2e/tests/runAll.cy.ts\" --browser=chrome"
1213
},
1314
"devDependencies": {
1415
"concurrently": "7.3.0"

0 commit comments

Comments
 (0)