Skip to content

Commit bc0206a

Browse files
committed
docs: new README, LICENSE and CONTRIBUTING
1 parent 94780eb commit bc0206a

File tree

8 files changed

+414
-215
lines changed

8 files changed

+414
-215
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@
1212
!.yarn/plugins
1313
!.yarn/releases
1414
!.yarn/sdks
15-
!.yarn/versions
15+
!.yarn/versions
16+
17+
# .env
18+
**/.env*

CONTRIBUTING.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
## Package development
2+
3+
The repository has a [`gitpod.yml`](.gitpod.yml) and [GitPod](https://gitpod.io/) offers 50 hours/month for free for working on public repos. The easiest way to get started with development.
4+
5+
### Run an e2e app development server with local packages
6+
7+
Run in repo root:
8+
9+
```
10+
yarn dev
11+
```
12+
13+
It will rebuild and rebundle packages on changes and run `next dev` of the e2e test app in parallel.
14+
15+
16+
### Serve an e2e app production build with local packages
17+
18+
Required to test and evaluate things around strict CSPs. Run in repo root:
19+
20+
```
21+
yarn start
22+
```
23+
24+
It will (re)build all packages in the repo that have changed and serve a production build of the e2e app with `next start` and local package builds.
25+
26+
27+
### Deploy the e2e app with local packages to Vercel
28+
So see the behavior of the package in a production environment, you can deploy the e2e app to Vercel.
29+
It will always use the local packages built from the last commit you pushed/deployed.
30+
31+
First, [fork this repo](https://github.com/nibtime/next-safe-middleware/fork). Then click the deploy button and import your fork:
32+
33+
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/project)
34+
35+
Afterwards, you need to customize commands in Vercel project settings to make it work with [Yarn 3 monorepo structure](#repository-structure).
36+
37+
#### In your Vercel project settings
38+
39+
Set `apps/e2e` as "Root Directory" and enable "Include source files outside of the Root Directory in the Build Step."
40+
41+
In "Build & Development Settings":
42+
43+
Set "Framework Preset" to `Next.js`
44+
45+
and override the following commands:
46+
47+
**Build Command:**
48+
```
49+
cd ../.. && yarn build:e2e:vercel
50+
```
51+
**Install Command:**
52+
```
53+
yarn install --immutable --immutable-cache
54+
```
55+
56+
## Submit PRs
57+
TODO
58+
59+
## Report bugs
60+
TODO
61+
62+
## Suggest features and enhancements
63+
TODO
64+
65+
## Ask questions
66+
TODO
67+
68+
## Commit and code conventions
69+
TODO + setup for ESLint, Prettier, husky and lint-staged will be provided at some point.
70+
71+
## Repository structure
72+
TODO
73+
74+
## Attributions
75+
76+
Policy icon in [README](packages/next-safe-middleware/_README.md) created by [Kiranshastry - Flaticon](https://www.flaticon.com/free-icons/policy)

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 nibtime
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

-46
This file was deleted.

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
packages/next-safe-middleware/README.md

apps/e2e/LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 nibtime
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

packages/next-safe-middleware/LICENSE

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../LICENSE

0 commit comments

Comments
 (0)