-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PFX-637] Support create App Router (#777)
* feat: added app router prompt to next plugin * tests: next plugin * chore: fix linting errors in next plugin * chore: reuse index page * chore: update readme * chore: removed lang attr on html tag * chore: added default nextServer outside of approuter prompt
- Loading branch information
1 parent
ddcc16a
commit 9b056be
Showing
18 changed files
with
110 additions
and
31 deletions.
There are no files selected for viewing
8 changes: 0 additions & 8 deletions
8
packages/gasket-plugin-cypress/generator/test/e2e/index.cy.js
This file was deleted.
Oops, something went wrong.
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
14 changes: 14 additions & 0 deletions
14
packages/gasket-plugin-nextjs/generator/app/app-router/app/layout.js
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,14 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
export default function RootLayout({ children }) { | ||
return ( | ||
<html lang='en'> | ||
<body>{children}</body> | ||
</html> | ||
); | ||
} | ||
|
||
RootLayout.propTypes = { | ||
children: PropTypes.node | ||
}; |
9 changes: 9 additions & 0 deletions
9
packages/gasket-plugin-nextjs/generator/app/app-router/app/page.js
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,9 @@ | ||
import IndexPage from '../components/index-page'; | ||
|
||
export const metadata = { | ||
title: 'Home', | ||
description: 'A basic gasket app', | ||
charset: 'UTF-8' | ||
}; | ||
|
||
export default IndexPage |
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
packages/gasket-plugin-nextjs/generator/app/pages-router/pages/index.js
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 @@ | ||
import IndexPage from '../components/index-page'; | ||
|
||
export default IndexPage; |
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
...lugin-nextjs/generator/app/pages/index.js → ...rator/app/shared/components/index-page.js
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
2 changes: 1 addition & 1 deletion
2
packages/gasket-plugin-nextjs/generator/jest/test/index.spec.js
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
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
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
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
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
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
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
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