faustjs icon indicating copy to clipboard operation
faustjs copied to clipboard

[MERL-376] Add POC example of file based pages

Open theodesp opened this issue 2 years ago • 4 comments

Description

This PR adds an example of how we can support Next.js file based pages in faustNX. It introduces two familiar helper functions:

  • getNextStaticProps: Used within the getStaticProps
  • getNextServerSideProps: Used within the getNextServerSideProps

Related Issue(s):

Testing

  1. Build the project
  2. Create a new page named sample-page in WordPress
  3. Navigate to the /sample-page path in Faust.js
  4. Check that the title is populated from the sample-page page.

Screenshots

Screenshot 2022-08-09 at 17 15 10

Documentation Changes

Dependant PRs

theodesp avatar Aug 09 '22 16:08 theodesp

⚠️ No Changeset found

Latest commit: 17a1cb83277d938e92aeaff9c42df08496af015b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Aug 09 '22 16:08 changeset-bot[bot]

Coverage report for packages/core

St.:grey_question:
Category Percentage Covered / Total
🟢 Statements 90.48% 304/336
🟢 Branches 84.83% 123/145
🟢 Functions 89.58% 43/48
🟢 Lines 90.33% 299/331

Test suite run success

61 tests passing in 7 suites.

Report generated by 🧪jest coverage report action from 17a1cb83277d938e92aeaff9c42df08496af015b

github-actions[bot] avatar Aug 09 '22 16:08 github-actions[bot]

Coverage report for packages/react

St.:grey_question:
Category Percentage Covered / Total
🟢 Statements 100% 0/0
🟢 Branches 100% 0/0
🟢 Functions 100% 0/0
🟢 Lines 100% 0/0

Test suite run success

0 tests passing in 0 suite.

Report generated by 🧪jest coverage report action from 17a1cb83277d938e92aeaff9c42df08496af015b

github-actions[bot] avatar Aug 09 '22 16:08 github-actions[bot]

Coverage report for packages/next

St.:grey_question:
Category Percentage Covered / Total
🟢 Statements 99.07% 212/214
🟢 Branches 84.33% 183/217
🟢 Functions 100% 33/33
🟢 Lines 99.07% 212/214

Test suite run success

52 tests passing in 7 suites.

Report generated by 🧪jest coverage report action from 17a1cb83277d938e92aeaff9c42df08496af015b

github-actions[bot] avatar Aug 09 '22 16:08 github-actions[bot]