Skip to content

Commit f9e5f35

Browse files
chore: fix the nx demo (#1636)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 5cf8c52 commit f9e5f35

33 files changed

+15496
-21222
lines changed

cypress/integration/nx/general.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ describe('Default site', () => {
44
})
55

66
it('loads home page', () => {
7-
cy.findByRole('heading', { name: 'Welcome to nx-nextjs-monorepo!' })
7+
cy.findByRole('heading', { name: 'Hello there, Welcome demo-monorepo 👋' })
88

99
cy.visit('//')
1010
cy.url().should('eq', `${Cypress.config().baseUrl}/`)
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+
# Next.js
42+
.next

demos/nx-next-monorepo-demo/.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"recommendations": [
3+
"nrwl.angular-console",
4+
"esbenp.prettier-vscode",
5+
"firsttris.vscode-jest-runner",
6+
"dbaeumer.vscode-eslint"
7+
]
8+
}

demos/nx-next-monorepo-demo/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# NxNextjsMonorepo
1+
# NxNextMonorepo
22

3-
This project was generated using [Nx](https://nx.dev). It is a demo site to test that Nx monorepos work properly with the Netlify Next Runtime.
3+
This project was generated using [Nx](https://nx.dev).
44

55
<p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="450"></p>
66

7-
🔎 **Smart, Extensible Build Framework**
7+
🔎 **Smart, Fast and Extensible Build System**
88

99
## Adding capabilities to your workspace
1010

@@ -44,7 +44,7 @@ Run `nx g @nrwl/react:lib my-lib` to generate a library.
4444

4545
> You can also use any of the plugins above to generate libraries as well.
4646
47-
Libraries are shareable across libraries and applications. They can be imported from `@nx-nextjs-monorepo/mylib`.
47+
Libraries are shareable across libraries and applications. They can be imported from `@nx-next-monorepo/mylib`.
4848

4949
## Development server
5050

@@ -68,13 +68,13 @@ Run `nx affected:test` to execute the unit tests affected by a change.
6868

6969
## Running end-to-end tests
7070

71-
Run `ng e2e my-app` to execute the end-to-end tests via [Cypress](https://www.cypress.io).
71+
Run `nx e2e my-app` to execute the end-to-end tests via [Cypress](https://www.cypress.io).
7272

7373
Run `nx affected:e2e` to execute the end-to-end tests affected by a change.
7474

7575
## Understand your workspace
7676

77-
Run `nx dep-graph` to see a diagram of the dependencies of your projects.
77+
Run `nx graph` to see a diagram of the dependencies of your projects.
7878

7979
## Further help
8080

demos/nx-next-monorepo-demo/apps/demo-monorepo-e2e/project.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
2-
"root": "apps/demo-monorepo-e2e",
2+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
33
"sourceRoot": "apps/demo-monorepo-e2e/src",
44
"projectType": "application",
55
"targets": {
66
"e2e": {
77
"executor": "@nrwl/cypress:cypress",
88
"options": {
99
"cypressConfig": "apps/demo-monorepo-e2e/cypress.json",
10-
"devServerTarget": "demo-monorepo:serve"
10+
"devServerTarget": "demo-monorepo:serve:development",
11+
"testingType": "e2e"
1112
},
1213
"configurations": {
1314
"production": {

demos/nx-next-monorepo-demo/apps/demo-monorepo-e2e/src/integration/app.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ describe('demo-monorepo', () => {
88
cy.login('[email protected]', 'myPassword');
99

1010
// Function helper example, see `../support/app.po.ts` file
11-
getGreeting().contains('Welcome to demo-monorepo!');
11+
getGreeting().contains('Welcome demo-monorepo');
1212
});
1313
});

demos/nx-next-monorepo-demo/apps/demo-monorepo-e2e/src/support/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// ***********************************************************
2-
// This example support/index.js is processed and
2+
// This example support/index.ts is processed and
33
// loaded automatically before your test files.
44
//
55
// This is a great place to put global configuration and
@@ -13,5 +13,5 @@
1313
// https://on.cypress.io/configuration
1414
// ***********************************************************
1515

16-
// Import commands.js using ES2015 syntax:
16+
// Import commands.ts using ES2015 syntax:
1717
import './commands';

demos/nx-next-monorepo-demo/apps/demo-monorepo/.eslintrc.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"extends": [
33
"plugin:@nrwl/nx/react-typescript",
4-
"../../.eslintrc.json",
54
"next",
6-
"next/core-web-vitals"
5+
"next/core-web-vitals",
6+
"../../.eslintrc.json"
77
],
8-
"ignorePatterns": ["!**/*"],
8+
"ignorePatterns": ["!**/*", ".next/**/*"],
99
"overrides": [
1010
{
1111
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
@@ -25,6 +25,9 @@
2525
"rules": {}
2626
}
2727
],
28+
"rules": {
29+
"@next/next/no-html-link-for-pages": "off"
30+
},
2831
"env": {
2932
"jest": true
3033
}

demos/nx-next-monorepo-demo/apps/demo-monorepo/jest.config.js renamed to demos/nx-next-monorepo-demo/apps/demo-monorepo/jest.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
module.exports = {
1+
/* eslint-disable */
2+
export default {
23
displayName: 'demo-monorepo',
34
preset: '../../jest.preset.js',
45
transform: {

0 commit comments

Comments
 (0)