Skip to content

Commit 6d815d2

Browse files
committed
Add README
1 parent 2c1037a commit 6d815d2

File tree

4 files changed

+199
-21
lines changed

4 files changed

+199
-21
lines changed

.all-contributorsrc

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"projectName": "babel-plugin-superjson-next",
3+
"projectOwner": "skn0tt",
4+
"repoType": "github",
5+
"repoHost": "https://github.com",
6+
"files": [
7+
"README.md"
8+
],
9+
"imageSize": 100,
10+
"commit": false,
11+
"commitConvention": "none",
12+
"badgeTemplate": "<a href=\"#contributors\"><img src=\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>-orange.svg?style=flat-square\" alt=\"All Contributors\"/></a>",
13+
"contributors": [
14+
{
15+
"login": "Skn0tt",
16+
"name": "Simon Knott",
17+
"avatar_url": "https://avatars1.githubusercontent.com/u/14912729?v=4",
18+
"profile": "https://github.com/Skn0tt",
19+
"contributions": [
20+
"code",
21+
"video",
22+
"ideas",
23+
"maintenance"
24+
]
25+
},
26+
{
27+
"login": "flybayer",
28+
"name": "Brandon Bayer",
29+
"avatar_url": "https://avatars3.githubusercontent.com/u/8813276?v=4",
30+
"profile": "https://twitter.com/flybayer",
31+
"contributions": [
32+
"ideas",
33+
"talk"
34+
]
35+
}
36+
],
37+
"contributorsPerLine": 7
38+
}

README.md

Lines changed: 59 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,71 @@
1-
# TSDX Bootstrap
1+
<p style="display: flex; justify-content: center; align-items: center;">
2+
<img alt="superjson" src="https://github.com/blitz-js/superjson/raw/main/docs/superjson.png" width="180" />
3+
<span style="margin: 12px; font-size: 24px; font-weight: 100">X</span>
4+
<img alt="next.js" src="https://seeklogo.com/images/N/next-js-logo-7929BCD36F-seeklogo.com.png" width="90" />
5+
</p>
26

3-
This project was bootstrapped with [TSDX](https://github.com/jaredpalmer/tsdx).
7+
<p align="center">
8+
Automatically transform your Next.js Pages to use SuperJSON.
9+
Supports <code>getStaticProps</code> & <code>getServerSideProps</code>.
10+
</p>
411

5-
## Local Development
12+
<p align="center">
13+
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
14+
<a href="#contributors"><img src="https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square" alt="All Contributors"/></a>
15+
<!-- ALL-CONTRIBUTORS-BADGE:END -->
16+
<a href="https://www.npmjs.com/package/otion">
17+
<img alt="npm" src="https://img.shields.io/npm/v/babel-plugin-superjson-next" />
18+
</a>
619

7-
Below is a list of commands you will probably find useful.
20+
<a href="https://github.com/blitz-js/superjson/actions">
21+
<img
22+
alt="CI"
23+
src="https://github.com/blitz-js/superjson/workflows/CI/badge.svg"
24+
/>
25+
</a>
26+
</p>
827

9-
### `npm start` or `yarn start`
28+
## Getting started
1029

11-
Runs the project in development/watch mode. Your project will be rebuilt upon changes. TSDX has a special logger for you convenience. Error messages are pretty printed and formatted for compatibility VS Code's Problems tab.
30+
Install the library with your package manager of choice, e.g.:
1231

13-
<img src="https://user-images.githubusercontent.com/4060187/52168303-574d3a00-26f6-11e9-9f3b-71dbec9ebfcb.gif" width="600" />
32+
```
33+
yarn add -D babel-plugin-superjson-next
34+
```
1435

15-
Your library will be rebuilt if you make edits.
36+
Add the plugin to your `.babelrc`.
37+
If you don't have one, create it.
1638

17-
### `npm run build` or `yarn build`
1839

19-
Bundles the package to the `dist` folder.
20-
The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module).
40+
```json5
41+
{
42+
"presets": ["next/babel"],
43+
"plugins": [
44+
...
45+
"superjson-next" // 👈
46+
]
47+
}
48+
```
2149

22-
<img src="https://user-images.githubusercontent.com/4060187/52168322-a98e5b00-26f6-11e9-8cf6-222d716b75ef.gif" width="600" />
50+
That's it! Now you're free to use all values and type supported by SuperJSON in your Next.js Components.
2351

24-
### `npm test` or `yarn test`
52+
<!-- Potential new section: how it works -->
2553

26-
Runs the test watcher (Jest) in an interactive mode.
27-
By default, runs tests related to files changed since the last commit.
54+
## Contributors ✨
55+
56+
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
57+
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
58+
<!-- prettier-ignore-start -->
59+
<!-- markdownlint-disable -->
60+
<table>
61+
<tr>
62+
<td align="center"><a href="https://github.com/Skn0tt"><img src="https://avatars1.githubusercontent.com/u/14912729?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Simon Knott</b></sub></a><br /><a href="https://github.com/skn0tt/babel-plugin-superjson-next/commits?author=Skn0tt" title="Code">💻</a> <a href="#video-Skn0tt" title="Videos">📹</a> <a href="#ideas-Skn0tt" title="Ideas, Planning, & Feedback">🤔</a> <a href="#maintenance-Skn0tt" title="Maintenance">🚧</a></td>
63+
<td align="center"><a href="https://twitter.com/flybayer"><img src="https://avatars3.githubusercontent.com/u/8813276?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Brandon Bayer</b></sub></a><br /><a href="#ideas-flybayer" title="Ideas, Planning, & Feedback">🤔</a> <a href="#talk-flybayer" title="Talks">📢</a></td>
64+
</tr>
65+
</table>
66+
67+
<!-- markdownlint-enable -->
68+
<!-- prettier-ignore-end -->
69+
<!-- ALL-CONTRIBUTORS-LIST:END -->
70+
71+
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"module": "dist/babel-plugin-superjson-next.esm.js",
4040
"devDependencies": {
4141
"@types/react": "^16.9.44",
42+
"all-contributors-cli": "^6.17.0",
4243
"babel-plugin-tester": "^9.2.0",
4344
"eslint-plugin-prettier": "^3.1.4",
4445
"husky": "^4.2.5",

yarn.lock

Lines changed: 101 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,6 +1155,13 @@
11551155
dependencies:
11561156
regenerator-runtime "^0.13.4"
11571157

1158+
"@babel/runtime@^7.10.4", "@babel/runtime@^7.7.6":
1159+
version "7.11.2"
1160+
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.11.2.tgz#f549c13c754cc40b87644b9fa9f09a6a95fe0736"
1161+
integrity sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==
1162+
dependencies:
1163+
regenerator-runtime "^0.13.4"
1164+
11581165
"@babel/template@^7.10.4", "@babel/template@^7.4.0", "@babel/template@^7.7.4":
11591166
version "7.10.4"
11601167
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.10.4.tgz#3251996c4200ebc71d1a8fc405fba940f36ba278"
@@ -1868,6 +1875,22 @@ ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.0, ajv@^6.12.2, ajv@^6.12.3:
18681875
json-schema-traverse "^0.4.1"
18691876
uri-js "^4.2.2"
18701877

1878+
all-contributors-cli@^6.17.0:
1879+
version "6.17.0"
1880+
resolved "https://registry.yarnpkg.com/all-contributors-cli/-/all-contributors-cli-6.17.0.tgz#cd671f224e5e54c9c13b6e4ffc2b71c6523056d1"
1881+
integrity sha512-sFU794ve7oo3l6D14LkJBPzWZ5RopLcjfhymOZeiud1KP7BNrOJxjB1WSJLVWlD8h2tzxERbotdt8PcCHO9ApQ==
1882+
dependencies:
1883+
"@babel/runtime" "^7.7.6"
1884+
async "^3.0.1"
1885+
chalk "^4.0.0"
1886+
didyoumean "^1.2.1"
1887+
inquirer "^7.0.4"
1888+
json-fixer "^1.5.1"
1889+
lodash "^4.11.2"
1890+
pify "^5.0.0"
1891+
request "^2.72.0"
1892+
yargs "^15.0.1"
1893+
18711894
18721895
version "1.4.1"
18731896
resolved "https://registry.yarnpkg.com/ally.js/-/ally.js-1.4.1.tgz#9fb7e6ba58efac4ee9131cb29aa9ee3b540bcf1e"
@@ -1935,7 +1958,7 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1:
19351958
dependencies:
19361959
color-convert "^1.9.0"
19371960

1938-
ansi-styles@^4.1.0:
1961+
ansi-styles@^4.0.0, ansi-styles@^4.1.0:
19391962
version "4.2.1"
19401963
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359"
19411964
integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==
@@ -2101,6 +2124,11 @@ async-limiter@~1.0.0:
21012124
resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd"
21022125
integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==
21032126

2127+
async@^3.0.1:
2128+
version "3.2.0"
2129+
resolved "https://registry.yarnpkg.com/async/-/async-3.2.0.tgz#b3a2685c5ebb641d3de02d161002c60fc9f85720"
2130+
integrity sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==
2131+
21042132
asynckit@^0.4.0:
21052133
version "0.4.0"
21062134
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
@@ -2843,6 +2871,15 @@ cliui@^5.0.0:
28432871
strip-ansi "^5.2.0"
28442872
wrap-ansi "^5.1.0"
28452873

2874+
cliui@^6.0.0:
2875+
version "6.0.0"
2876+
resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1"
2877+
integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==
2878+
dependencies:
2879+
string-width "^4.2.0"
2880+
strip-ansi "^6.0.0"
2881+
wrap-ansi "^6.2.0"
2882+
28462883
clone-deep@^4.0.1:
28472884
version "4.0.1"
28482885
resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387"
@@ -3455,6 +3492,11 @@ detect-newline@^2.1.0:
34553492
resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2"
34563493
integrity sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=
34573494

3495+
didyoumean@^1.2.1:
3496+
version "1.2.1"
3497+
resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.1.tgz#e92edfdada6537d484d73c0172fd1eba0c4976ff"
3498+
integrity sha1-6S7f2tplN9SE1zwBcv0eugxJdv8=
3499+
34583500
diff-sequences@^24.9.0:
34593501
version "24.9.0"
34603502
resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-24.9.0.tgz#5715d6244e2aa65f48bba0bc972db0b0b11e95b5"
@@ -4213,7 +4255,7 @@ find-up@^3.0.0:
42134255
dependencies:
42144256
locate-path "^3.0.0"
42154257

4216-
find-up@^4.0.0:
4258+
find-up@^4.0.0, find-up@^4.1.0:
42174259
version "4.1.0"
42184260
resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19"
42194261
integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==
@@ -4735,7 +4777,7 @@ [email protected]:
47354777
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
47364778
integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
47374779

4738-
inquirer@^7.0.0:
4780+
inquirer@^7.0.0, inquirer@^7.0.4:
47394781
version "7.3.3"
47404782
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003"
47414783
integrity sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==
@@ -5541,6 +5583,15 @@ jsesc@~0.5.0:
55415583
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d"
55425584
integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=
55435585

5586+
json-fixer@^1.5.1:
5587+
version "1.5.4"
5588+
resolved "https://registry.yarnpkg.com/json-fixer/-/json-fixer-1.5.4.tgz#6ca893dbb4ca688f737543247bb5af235e74aa04"
5589+
integrity sha512-ZyMkHr45kMBzl9yeAkeMX8CAPDuL2PL+SN6s+IsPfdknpC03c5A+0190XYV2qTD4kMMZvxMuB6A3R96SEQG+EA==
5590+
dependencies:
5591+
"@babel/runtime" "^7.10.4"
5592+
chalk "^4.1.0"
5593+
pegjs "^0.10.0"
5594+
55445595
json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2:
55455596
version "1.0.2"
55465597
resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9"
@@ -5776,7 +5827,7 @@ lodash.uniq@^4.5.0:
57765827
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
57775828
integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=
57785829

5779-
lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.4:
5830+
lodash@^4.11.2, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.4:
57805831
version "4.17.19"
57815832
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b"
57825833
integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==
@@ -6718,6 +6769,11 @@ pbkdf2@^3.0.3:
67186769
safe-buffer "^5.0.1"
67196770
sha.js "^2.4.8"
67206771

6772+
pegjs@^0.10.0:
6773+
version "0.10.0"
6774+
resolved "https://registry.yarnpkg.com/pegjs/-/pegjs-0.10.0.tgz#cf8bafae6eddff4b5a7efb185269eaaf4610ddbd"
6775+
integrity sha1-z4uvrm7d/0tafvsYUmnqr0YQ3b0=
6776+
67216777
performance-now@^2.1.0:
67226778
version "2.1.0"
67236779
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
@@ -6743,6 +6799,11 @@ pify@^4.0.1:
67436799
resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231"
67446800
integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==
67456801

6802+
pify@^5.0.0:
6803+
version "5.0.0"
6804+
resolved "https://registry.yarnpkg.com/pify/-/pify-5.0.0.tgz#1f5eca3f5e87ebec28cc6d54a0e4aaf00acc127f"
6805+
integrity sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==
6806+
67466807
pirates@^4.0.1:
67476808
version "4.0.1"
67486809
resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87"
@@ -7556,7 +7617,7 @@ request-promise-native@^1.0.5:
75567617
stealthy-require "^1.1.1"
75577618
tough-cookie "^2.3.3"
75587619

7559-
request@^2.87.0:
7620+
request@^2.72.0, request@^2.87.0:
75607621
version "2.88.2"
75617622
resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3"
75627623
integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==
@@ -8309,7 +8370,7 @@ string-width@^3.0.0, string-width@^3.1.0:
83098370
is-fullwidth-code-point "^2.0.0"
83108371
strip-ansi "^5.1.0"
83118372

8312-
string-width@^4.1.0:
8373+
string-width@^4.1.0, string-width@^4.2.0:
83138374
version "4.2.0"
83148375
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5"
83158376
integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==
@@ -9228,6 +9289,15 @@ wrap-ansi@^5.1.0:
92289289
string-width "^3.0.0"
92299290
strip-ansi "^5.0.0"
92309291

9292+
wrap-ansi@^6.2.0:
9293+
version "6.2.0"
9294+
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53"
9295+
integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==
9296+
dependencies:
9297+
ansi-styles "^4.0.0"
9298+
string-width "^4.1.0"
9299+
strip-ansi "^6.0.0"
9300+
92319301
wrappy@1:
92329302
version "1.0.2"
92339303
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
@@ -9301,6 +9371,14 @@ yargs-parser@^13.1.2:
93019371
camelcase "^5.0.0"
93029372
decamelize "^1.2.0"
93039373

9374+
yargs-parser@^18.1.2:
9375+
version "18.1.3"
9376+
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0"
9377+
integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==
9378+
dependencies:
9379+
camelcase "^5.0.0"
9380+
decamelize "^1.2.0"
9381+
93049382
yargs@^13.3.0:
93059383
version "13.3.2"
93069384
resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd"
@@ -9316,3 +9394,20 @@ yargs@^13.3.0:
93169394
which-module "^2.0.0"
93179395
y18n "^4.0.0"
93189396
yargs-parser "^13.1.2"
9397+
9398+
yargs@^15.0.1:
9399+
version "15.4.1"
9400+
resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8"
9401+
integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==
9402+
dependencies:
9403+
cliui "^6.0.0"
9404+
decamelize "^1.2.0"
9405+
find-up "^4.1.0"
9406+
get-caller-file "^2.0.1"
9407+
require-directory "^2.1.1"
9408+
require-main-filename "^2.0.0"
9409+
set-blocking "^2.0.0"
9410+
string-width "^4.2.0"
9411+
which-module "^2.0.0"
9412+
y18n "^4.0.0"
9413+
yargs-parser "^18.1.2"

0 commit comments

Comments
 (0)