Skip to content

Commit

Permalink
fix it
Browse files Browse the repository at this point in the history
  • Loading branch information
flybayer committed Jan 21, 2021
1 parent b304627 commit ab11333
Show file tree
Hide file tree
Showing 14 changed files with 136 additions and 163 deletions.
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,35 @@ npm install superjson
Add the plugin to your `.babelrc`.
If you don't have one, create it.


```json5
{
"presets": ["next/babel"],
"plugins": [
...
"superjson-next" // 👈
]
presets: ['next/babel'],
plugins: [
...'superjson-next', // 👈
],
}
```

That's it! Now you're free to use all values and type supported by SuperJSON in your Next.js Components.

<!-- Potential new section: how it works -->

## Contributing

1. Clone the repo
1. `yarn`
1. `yarn build`

### Test Example App

1. `cd example`
2. `yarn` (make sure you first run `yarn build` in the repo root)
3. `yarn test`

## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
Expand Down
6 changes: 3 additions & 3 deletions example/.testcaferc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"appCommand": "yarn start",
"appInitDelay": 2000
}
"appCommand": "yarn start -p 3099",
"appInitDelay": 2000
}
10 changes: 5 additions & 5 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
},
"dependencies": {
"babel-plugin-superjson-next": "file:../",
"next": "10",
"react": "16.13.1",
"react-dom": "16.13.1",
"superjson": "^1.4.1"
"next": "10.0.5",
"react": "17.0.1",
"react-dom": "17.0.1",
"superjson": "^1.5.0"
},
"devDependencies": {
"@types/react": "^16.9.44",
"@types/react": "^17.0.0",
"testcafe": "^1.10.1"
}
}
2 changes: 1 addition & 1 deletion example/tests/fallback.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Selector } from 'testcafe';

fixture`Fallback`.page`http://localhost:3000/fallback/hello`;
fixture`Fallback`.page`http://localhost:3099/fallback/hello`;

test('Date is preserved', async (t) => {
const result = Selector('#__next');
Expand Down
2 changes: 1 addition & 1 deletion example/tests/gsp-arrow.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Selector } from 'testcafe';

fixture`gSP Arrow`.page`http://localhost:3000/gsp-arrow`;
fixture`gSP Arrow`.page`http://localhost:3099/gsp-arrow`;

test('Date is preserved', async (t) => {
const result = Selector('#__next');
Expand Down
2 changes: 1 addition & 1 deletion example/tests/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Selector } from 'testcafe';

fixture`Index`.page`http://localhost:3000/`;
fixture`Index`.page`http://localhost:3099/`;

test('Date is preserved', async (t) => {
const result = Selector('#__next');
Expand Down
2 changes: 1 addition & 1 deletion example/tests/no-meta.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Selector } from 'testcafe';

fixture`No meta`.page`http://localhost:3000/no-meta`;
fixture`No meta`.page`http://localhost:3099/no-meta`;

test('Raw object is built', async (t) => {
const result = Selector('#__next');
Expand Down
2 changes: 1 addition & 1 deletion example/tests/static.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Selector } from 'testcafe';

fixture`Static`.page`http://localhost:3000/static`;
fixture`Static`.page`http://localhost:3099/static`;

test('Date is preserved', async (t) => {
const result = Selector('#__next');
Expand Down
2 changes: 1 addition & 1 deletion example/tests/with-static-methods.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Selector } from 'testcafe';

fixture`With Static Methods`.page`http://localhost:3000/with-static-methods`;
fixture`With Static Methods`.page`http://localhost:3099/with-static-methods`;

test('Static methods are preserved', async (t) => {
const result = Selector('#__next');
Expand Down
Loading

0 comments on commit ab11333

Please sign in to comment.