Compare commits
606 Commits
blitz@2.0.
...
v0.14.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9eb85f61ed | ||
|
|
f0775cbbb9 | ||
|
|
25e9b2645e | ||
|
|
2ace6c728b | ||
|
|
da7f542122 | ||
|
|
8d0da90367 | ||
|
|
24f55ab085 | ||
|
|
ea63de0d21 | ||
|
|
2230842648 | ||
|
|
ad77e2cdd9 | ||
|
|
439d12694b | ||
|
|
6a951c9d3c | ||
|
|
f185138712 | ||
|
|
bf13f61046 | ||
|
|
c3d4882151 | ||
|
|
56f4e6efec | ||
|
|
a175fd2f26 | ||
|
|
7975373551 | ||
|
|
73502e3a9a | ||
|
|
b04a76a6dc | ||
|
|
c05b43a4dd | ||
|
|
e99462b8ff | ||
|
|
201ea1eb25 | ||
|
|
9c9c42309a | ||
|
|
baf4907912 | ||
|
|
bc1e695ca8 | ||
|
|
3f6b9ef1ad | ||
|
|
a5410053e1 | ||
|
|
798eb7a394 | ||
|
|
cda8313cfd | ||
|
|
462e22a745 | ||
|
|
3215b32b32 | ||
|
|
c64256ca26 | ||
|
|
6459d24bce | ||
|
|
15d00bc8de | ||
|
|
643e6a1701 | ||
|
|
09932642f9 | ||
|
|
b3a5ab20d4 | ||
|
|
9c387e11be | ||
|
|
96013f4a9c | ||
|
|
a5a8f4268a | ||
|
|
f398efa76c | ||
|
|
b34c0d77b9 | ||
|
|
922cba40f3 | ||
|
|
451dcb7e45 | ||
|
|
3b316448a7 | ||
|
|
280755c83a | ||
|
|
b94a55f9ce | ||
|
|
3ab8951764 | ||
|
|
83f01434c4 | ||
|
|
e7dcf1c898 | ||
|
|
533f97c1c8 | ||
|
|
d9fb0dde48 | ||
|
|
077644ec76 | ||
|
|
21060b410b | ||
|
|
f53a560b84 | ||
|
|
7bdc524de4 | ||
|
|
36ffb7c93a | ||
|
|
ce9d2aa8dc | ||
|
|
05dad27f35 | ||
|
|
1700343f11 | ||
|
|
2a0ab59f0f | ||
|
|
c057bfd531 | ||
|
|
855363b2c7 | ||
|
|
c8a5304d3c | ||
|
|
3aa919e825 | ||
|
|
4181efb75c | ||
|
|
7b7b3383ed | ||
|
|
e1b1fcb6b5 | ||
|
|
d3b9fce0bd | ||
|
|
5d0531d35a | ||
|
|
0f6ea26560 | ||
|
|
5c434e3b3e | ||
|
|
b5f0cb2ae7 | ||
|
|
02219a22e7 | ||
|
|
c80f28b588 | ||
|
|
4daa44442f | ||
|
|
0bd1b6fefc | ||
|
|
0f279082c4 | ||
|
|
cde418ffae | ||
|
|
9e681c6363 | ||
|
|
2b4aa6fb2e | ||
|
|
c11ffe82b0 | ||
|
|
0296f3c5c3 | ||
|
|
279557459d | ||
|
|
3b64d994f7 | ||
|
|
50e7a8f1fe | ||
|
|
f3ad5fde7c | ||
|
|
129fd02ce1 | ||
|
|
b622847184 | ||
|
|
c743e82451 | ||
|
|
ee91ef2972 | ||
|
|
a7195f44b3 | ||
|
|
b1c8cf6e00 | ||
|
|
227f5da7ba | ||
|
|
dc9c9756ae | ||
|
|
9aebf5129d | ||
|
|
c23aba87b6 | ||
|
|
fcd572a5e4 | ||
|
|
a8e352ce17 | ||
|
|
e69a7b6166 | ||
|
|
b66b655154 | ||
|
|
b900095313 | ||
|
|
4f7fc78e59 | ||
|
|
eaf1e0c340 | ||
|
|
8786b2034b | ||
|
|
7ec2a22b64 | ||
|
|
1429b510bd | ||
|
|
b16d6b8e5a | ||
|
|
2c5bc8dbf4 | ||
|
|
25904c8d55 | ||
|
|
eb7f668d52 | ||
|
|
f223f84f02 | ||
|
|
46185f8832 | ||
|
|
e543e8a892 | ||
|
|
a7ae0fbc0c | ||
|
|
3317ab74c2 | ||
|
|
3f265c8f5b | ||
|
|
0e647ddfac | ||
|
|
1c064e56b2 | ||
|
|
e63fe53dc6 | ||
|
|
6858fe4101 | ||
|
|
f5b7b25611 | ||
|
|
b2407ebdea | ||
|
|
caefccfda1 | ||
|
|
4f5c09f32c | ||
|
|
1c0d7e1d5b | ||
|
|
ed27152c51 | ||
|
|
95bbbfc4e7 | ||
|
|
c17e161f80 | ||
|
|
7456d62171 | ||
|
|
9eb5bb4584 | ||
|
|
17d9895070 | ||
|
|
b7bc20574a | ||
|
|
5dbe2af6ed | ||
|
|
a1e41101cc | ||
|
|
3e04881e96 | ||
|
|
ee6e492185 | ||
|
|
ec613d4549 | ||
|
|
717548af26 | ||
|
|
287b72726e | ||
|
|
d76fc7494c | ||
|
|
33e28877e9 | ||
|
|
114ae77bec | ||
|
|
4cf74b19b5 | ||
|
|
96b12eabe3 | ||
|
|
d51b92bbec | ||
|
|
5e4227181b | ||
|
|
7761f63534 | ||
|
|
f1881993dd | ||
|
|
7cfc586667 | ||
|
|
19e4620c23 | ||
|
|
3a407b7c08 | ||
|
|
6eb07b688f | ||
|
|
c147048e6d | ||
|
|
750cba1b19 | ||
|
|
ffaba32b12 | ||
|
|
dedad9e55a | ||
|
|
ea91de84c0 | ||
|
|
944ec4576b | ||
|
|
96b8f69464 | ||
|
|
17a43b8001 | ||
|
|
cbce0c7ac1 | ||
|
|
0117198864 | ||
|
|
150d320e7f | ||
|
|
290702e7be | ||
|
|
75a7feabf9 | ||
|
|
603e5cbaf2 | ||
|
|
3c52246478 | ||
|
|
3acf590e1c | ||
|
|
060cfac2f8 | ||
|
|
3e5d2f4c6f | ||
|
|
623c4b37fc | ||
|
|
6e85653f82 | ||
|
|
8e5e2b3cbd | ||
|
|
094df2a7bb | ||
|
|
47155fbec3 | ||
|
|
96ef3fe6b7 | ||
|
|
6cd9d9496c | ||
|
|
223ab891db | ||
|
|
25c5e05ea3 | ||
|
|
aad5ab772f | ||
|
|
4651ae021a | ||
|
|
8abcc8e78c | ||
|
|
44532424a9 | ||
|
|
bea6fdc0ec | ||
|
|
b6b110fd10 | ||
|
|
3339b131e1 | ||
|
|
58d1bcf2f9 | ||
|
|
c5008e263a | ||
|
|
ef451feb6a | ||
|
|
2bf589d4f8 | ||
|
|
fd8a29f9cd | ||
|
|
f0517e072d | ||
|
|
6cd3abe6ea | ||
|
|
2d8e33151f | ||
|
|
307f373b42 | ||
|
|
45cbd02370 | ||
|
|
cddba4ef7a | ||
|
|
4988dd7a00 | ||
|
|
ea61978d08 | ||
|
|
a11c1d4191 | ||
|
|
4ac78002ff | ||
|
|
10bb5873cf | ||
|
|
ac30c9f39b | ||
|
|
a5d3f9a493 | ||
|
|
2461caa685 | ||
|
|
1d16593dce | ||
|
|
3790e2cf17 | ||
|
|
92c0f85c82 | ||
|
|
2f2496fa00 | ||
|
|
e12d17b6c1 | ||
|
|
0153bd1444 | ||
|
|
230c363409 | ||
|
|
14a09e1e03 | ||
|
|
229272f772 | ||
|
|
f450692e65 | ||
|
|
d4654c8837 | ||
|
|
85fcebadd5 | ||
|
|
a7fd429e20 | ||
|
|
e688267f3f | ||
|
|
c8043d93d4 | ||
|
|
2c9e8e1318 | ||
|
|
386a7fdbe5 | ||
|
|
1b02b5fb39 | ||
|
|
ff097bd67b | ||
|
|
5a6f73b140 | ||
|
|
aa64c5e467 | ||
|
|
74487a37d5 | ||
|
|
50a2bd1db7 | ||
|
|
d1c2d44f94 | ||
|
|
26ebf8ce48 | ||
|
|
2063a1878f | ||
|
|
6911a2c60e | ||
|
|
a44dea27ac | ||
|
|
21f29d23ec | ||
|
|
83fbd5827b | ||
|
|
3b595320aa | ||
|
|
e10f1253db | ||
|
|
b7331375df | ||
|
|
b249ce04a6 | ||
|
|
aa5eb90952 | ||
|
|
6819da290b | ||
|
|
fd1cd78a05 | ||
|
|
2b79c3f3bd | ||
|
|
e9ae33700c | ||
|
|
bec4a65d36 | ||
|
|
b7a8667003 | ||
|
|
e6ddb8603f | ||
|
|
d72f2839d7 | ||
|
|
7ec6244884 | ||
|
|
3892b23dfd | ||
|
|
a6c018b93d | ||
|
|
32d05e2447 | ||
|
|
b08de105ef | ||
|
|
b0120d718d | ||
|
|
f8c0f122b9 | ||
|
|
bfd4642955 | ||
|
|
2fb9abce86 | ||
|
|
a406c82607 | ||
|
|
ae15456576 | ||
|
|
99b4cd628c | ||
|
|
2552a99e6d | ||
|
|
a2b94603a0 | ||
|
|
e846560b3b | ||
|
|
fb298bb0c0 | ||
|
|
b417a6da83 | ||
|
|
c3f0609b0d | ||
|
|
6e1b8d63e4 | ||
|
|
1774d816a8 | ||
|
|
c16f8e65f3 | ||
|
|
54b716ef23 | ||
|
|
1e0cd973e0 | ||
|
|
d1d3c97303 | ||
|
|
3f428e3cb3 | ||
|
|
44c48839e0 | ||
|
|
79d9619c3d | ||
|
|
7b0a483c7b | ||
|
|
a33005e7c5 | ||
|
|
cec8b6130d | ||
|
|
9340d8dec9 | ||
|
|
d29e62965f | ||
|
|
9531593463 | ||
|
|
6fabfc41ba | ||
|
|
dd97061ac1 | ||
|
|
86ace11282 | ||
|
|
75816d11fd | ||
|
|
612c09f9b3 | ||
|
|
303ce52757 | ||
|
|
9e663e1c37 | ||
|
|
268f8bb4c0 | ||
|
|
01c016ab7b | ||
|
|
746eb7508c | ||
|
|
aeed847926 | ||
|
|
3bcc1de895 | ||
|
|
6f3ef059af | ||
|
|
523ce93402 | ||
|
|
e8f68a5c19 | ||
|
|
d5aa2b77e8 | ||
|
|
a36d943e05 | ||
|
|
7459f691ae | ||
|
|
08e351dcc1 | ||
|
|
ae3c530d8f | ||
|
|
79f1d23604 | ||
|
|
07a97ba992 | ||
|
|
4eb17f088a | ||
|
|
07312c1162 | ||
|
|
f519f159cf | ||
|
|
badd5adaf0 | ||
|
|
15f30d394c | ||
|
|
c2b85a747e | ||
|
|
cb028a6e3e | ||
|
|
192f79e064 | ||
|
|
a8d152ba87 | ||
|
|
875f99a20c | ||
|
|
c73bdc7487 | ||
|
|
040deeed32 | ||
|
|
9c670ef77d | ||
|
|
7db98c3636 | ||
|
|
08195b04e6 | ||
|
|
cdf8cc4a9f | ||
|
|
0c3b8dd17a | ||
|
|
fd624213b3 | ||
|
|
9d91117b97 | ||
|
|
8cd670296e | ||
|
|
14df845e16 | ||
|
|
7b6b024388 | ||
|
|
d736ea11f3 | ||
|
|
9a67da5993 | ||
|
|
ba981694ad | ||
|
|
1eebdb54c6 | ||
|
|
fe1f4b0785 | ||
|
|
63921f3e23 | ||
|
|
69b02ffb54 | ||
|
|
86eec51d24 | ||
|
|
d59c0a4fd3 | ||
|
|
852e32a484 | ||
|
|
052300f09d | ||
|
|
d2f94ff0cb | ||
|
|
262a228cd9 | ||
|
|
9bf36b0421 | ||
|
|
73d2251168 | ||
|
|
2d52ceec7f | ||
|
|
c8527d93f9 | ||
|
|
5a69c49976 | ||
|
|
49044611eb | ||
|
|
2997fcc17d | ||
|
|
6f1900c5e6 | ||
|
|
a342d62cb5 | ||
|
|
5c89d7feb9 | ||
|
|
92cf7b599f | ||
|
|
47d16202c3 | ||
|
|
5fb24faa1a | ||
|
|
815b351f4a | ||
|
|
b7528b2058 | ||
|
|
6af0eb7ea5 | ||
|
|
dcc9c4ddc9 | ||
|
|
e7982a1132 | ||
|
|
64eccf8bb4 | ||
|
|
caad5b44f1 | ||
|
|
4b4d65cb7e | ||
|
|
55fdaa0530 | ||
|
|
fb3893a8d4 | ||
|
|
ca5d6ee0aa | ||
|
|
f17820f81d | ||
|
|
ab6f60571a | ||
|
|
5f3d5dd7a3 | ||
|
|
8b8143d2c2 | ||
|
|
8b6a51f8f1 | ||
|
|
0c23a7873c | ||
|
|
0fa28d20c4 | ||
|
|
97132996b8 | ||
|
|
96ac63d3a4 | ||
|
|
132601f0c2 | ||
|
|
c47d15a09f | ||
|
|
0892137370 | ||
|
|
797060c068 | ||
|
|
1c7134c272 | ||
|
|
2638ec73b3 | ||
|
|
3c4db0453e | ||
|
|
d824459190 | ||
|
|
5da2eae6e1 | ||
|
|
73f6be0814 | ||
|
|
2dfa86556d | ||
|
|
7097150c2d | ||
|
|
84a8ac7512 | ||
|
|
ef48721625 | ||
|
|
a54b48190c | ||
|
|
ff5cab07fc | ||
|
|
02ccc7db0e | ||
|
|
9de79ba621 | ||
|
|
dfac941a80 | ||
|
|
f3f17a2452 | ||
|
|
aa6d0e0dc0 | ||
|
|
4b0b1b8c66 | ||
|
|
7e72dd3ccd | ||
|
|
0aa16e25ae | ||
|
|
9e5d58ddbd | ||
|
|
edd673f54c | ||
|
|
6cccbe3487 | ||
|
|
92069cfef8 | ||
|
|
b16424592f | ||
|
|
92c4a4bfc8 | ||
|
|
ffd87a80af | ||
|
|
9c54cfaef1 | ||
|
|
fd2e9d2988 | ||
|
|
3cc4476a98 | ||
|
|
1a45b2d394 | ||
|
|
bac7f21295 | ||
|
|
9755466f9b | ||
|
|
3a85e83b56 | ||
|
|
4e49239f53 | ||
|
|
f0a56ff2fe | ||
|
|
2a71e3441d | ||
|
|
63cacbb73c | ||
|
|
219d12aaa2 | ||
|
|
b1321c77e1 | ||
|
|
f7685b4abb | ||
|
|
cf215b4a12 | ||
|
|
32f0a76b18 | ||
|
|
e9e8841f07 | ||
|
|
d6b29a2f71 | ||
|
|
af338d99e4 | ||
|
|
bd63e4cab0 | ||
|
|
e387936cb0 | ||
|
|
0650252c53 | ||
|
|
76cfb8c076 | ||
|
|
6273ffd255 | ||
|
|
6e447f1f44 | ||
|
|
4c4721250a | ||
|
|
6852cfc208 | ||
|
|
da488ccf33 | ||
|
|
36d0ae8587 | ||
|
|
8bcaf62641 | ||
|
|
820d191a63 | ||
|
|
45842d48ad | ||
|
|
67ed16429d | ||
|
|
45cb96f9f1 | ||
|
|
9063758292 | ||
|
|
2a892ba4d0 | ||
|
|
73b3920a53 | ||
|
|
fae90065df | ||
|
|
fc762c15fc | ||
|
|
cc10b71f9d | ||
|
|
998d227832 | ||
|
|
35c150a46a | ||
|
|
920716a0d8 | ||
|
|
39675d1da8 | ||
|
|
dd20c0ac6c | ||
|
|
2ea1e7b522 | ||
|
|
44c3ea22e2 | ||
|
|
f4760776ee | ||
|
|
65bb7e8e84 | ||
|
|
8547585cc7 | ||
|
|
16b810e0c3 | ||
|
|
8d38c6c225 | ||
|
|
c00e78cbc7 | ||
|
|
11325ba136 | ||
|
|
477094d042 | ||
|
|
2c91340539 | ||
|
|
4c42176ec9 | ||
|
|
6564a268f6 | ||
|
|
9c66a2938e | ||
|
|
27e314821d | ||
|
|
bf4b90943b | ||
|
|
3b5f7bc6c8 | ||
|
|
0659b37d77 | ||
|
|
67950db948 | ||
|
|
45a09911a4 | ||
|
|
e89127358f | ||
|
|
cf94dc866d | ||
|
|
bd3841b43b | ||
|
|
50dd2dcc4e | ||
|
|
6443184f0f | ||
|
|
9f8a7afd17 | ||
|
|
5d3afb0230 | ||
|
|
9dfc5c53ed | ||
|
|
ba540bb546 | ||
|
|
b70296a7a2 | ||
|
|
36c0acdb92 | ||
|
|
549115af97 | ||
|
|
a4d6fe139e | ||
|
|
9010566895 | ||
|
|
167fc251fd | ||
|
|
4bcc2efbec | ||
|
|
4c1eed6248 | ||
|
|
36b4f101f9 | ||
|
|
9209c934ee | ||
|
|
ecd1118ce5 | ||
|
|
29820ac964 | ||
|
|
93dcd6d884 | ||
|
|
6f66e5bd72 | ||
|
|
df76a4b2ab | ||
|
|
b9391305b0 | ||
|
|
9e1ce7dda0 | ||
|
|
d956da624f | ||
|
|
4b29564f12 | ||
|
|
227c1204c2 | ||
|
|
1ca88afcef | ||
|
|
bb4272bbe6 | ||
|
|
b749884ddc | ||
|
|
0b18df1390 | ||
|
|
256387cbbd | ||
|
|
f80071913d | ||
|
|
c05afe8bf6 | ||
|
|
95713e627b | ||
|
|
4184a4fe5d | ||
|
|
5933b6189e | ||
|
|
2d545688cb | ||
|
|
c3dee2271e | ||
|
|
93865f4431 | ||
|
|
be1c57b345 | ||
|
|
5d22f9b2cc | ||
|
|
1ea4398216 | ||
|
|
bb93ed8843 | ||
|
|
e2eed221e0 | ||
|
|
6719104cb3 | ||
|
|
d103345b77 | ||
|
|
ae99dc4a55 | ||
|
|
4658f616f1 | ||
|
|
48861cbf25 | ||
|
|
c82de5cfd0 | ||
|
|
64185b884d | ||
|
|
9bdc4350f9 | ||
|
|
81735c4dec | ||
|
|
53eab985fd | ||
|
|
e16d66a4c5 | ||
|
|
bc3aa30929 | ||
|
|
9d8edb6ead | ||
|
|
25ff55291a | ||
|
|
2a9ac48a72 | ||
|
|
925098534f | ||
|
|
277c704be8 | ||
|
|
046b2ed300 | ||
|
|
ef579daf1c | ||
|
|
e44785bcff | ||
|
|
72697f25f9 | ||
|
|
fa6067eee7 | ||
|
|
6879be005e | ||
|
|
52e93a608b | ||
|
|
bce5a4bd37 | ||
|
|
1dad620368 | ||
|
|
f09b968e27 | ||
|
|
7f81d6291d | ||
|
|
f48a776e99 | ||
|
|
3e63287fa2 | ||
|
|
828c8d2f23 | ||
|
|
d8c2f696b1 | ||
|
|
4f21628365 | ||
|
|
0521b595fe | ||
|
|
f0159a05ae | ||
|
|
4a1e7e361f | ||
|
|
b1f620a579 | ||
|
|
dfbcb5bf67 | ||
|
|
0677a16e75 | ||
|
|
968b507570 | ||
|
|
e773b26f5f | ||
|
|
54e4759791 | ||
|
|
df0e5d3539 | ||
|
|
32944666f4 | ||
|
|
b5e0d7afed | ||
|
|
4bb86dc8b8 | ||
|
|
93a5fb057e | ||
|
|
3c044fd4d0 | ||
|
|
b430c87b65 | ||
|
|
903644b628 | ||
|
|
d26be24cb3 | ||
|
|
949e7eb83f | ||
|
|
97bb455cc4 | ||
|
|
cdb5ff2133 | ||
|
|
b1aee93e2d | ||
|
|
667566e341 | ||
|
|
c51443bf5d | ||
|
|
ab4a3d2748 | ||
|
|
6d6a689557 | ||
|
|
16c2031d2a | ||
|
|
590b20f12e | ||
|
|
c82c0b3689 | ||
|
|
18d38d79e7 | ||
|
|
4113124ec4 | ||
|
|
8f6d0e03ac | ||
|
|
c48fd8925b | ||
|
|
66af983955 | ||
|
|
55b735086c | ||
|
|
4e64784749 | ||
|
|
3ee2ef0b42 | ||
|
|
eaa6fc8802 | ||
|
|
ef6bf61c5b | ||
|
|
5f5b589a7f | ||
|
|
82ae27841c | ||
|
|
8623d5a817 | ||
|
|
250c49c7bd | ||
|
|
7739c3e951 | ||
|
|
8a7f7931f4 | ||
|
|
6579e85a96 | ||
|
|
1195f5225e | ||
|
|
9b206a9831 | ||
|
|
dae1db73e9 | ||
|
|
d63f59d2fa | ||
|
|
bbf9cb0d2b | ||
|
|
a44b1d93c1 | ||
|
|
3dab930a75 | ||
|
|
939fad20f6 | ||
|
|
2e06ef8637 | ||
|
|
12ab14bc57 | ||
|
|
45000493e0 |
695
.all-contributorsrc
Normal file
695
.all-contributorsrc
Normal file
@@ -0,0 +1,695 @@
|
||||
{
|
||||
"projectName": "blitz",
|
||||
"projectOwner": "blitz-js",
|
||||
"repoType": "github",
|
||||
"repoHost": "https://github.com",
|
||||
"files": [
|
||||
"README.md"
|
||||
],
|
||||
"badgeTemplate": "<a aria-label=\"All Contributors\" href=\"#contributors-\"><img alt=\"\" src=\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>-17BB8A.svg?style=for-the-badge&labelColor=000000\"></a>",
|
||||
"imageSize": 100,
|
||||
"commit": true,
|
||||
"commitConvention": "none",
|
||||
"contributors": [
|
||||
{
|
||||
"login": "flybayer",
|
||||
"name": "Brandon Bayer",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/8813276?v=4",
|
||||
"profile": "https://twitter.com/flybayer",
|
||||
"contributions": [
|
||||
"code",
|
||||
"content",
|
||||
"ideas",
|
||||
"review"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "ryardley",
|
||||
"name": "Rudi Yardley",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/1256409?v=4",
|
||||
"profile": "https://medium.com/@ryardley",
|
||||
"contributions": [
|
||||
"code",
|
||||
"ideas",
|
||||
"review",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "merelinguist",
|
||||
"name": "Dylan Brookes",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/24858006?v=4",
|
||||
"profile": "https://merelinguist.me",
|
||||
"contributions": [
|
||||
"code",
|
||||
"ideas",
|
||||
"review",
|
||||
"test",
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "aem",
|
||||
"name": "Adam Markon",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/1909883?v=4",
|
||||
"profile": "https://github.com/aem",
|
||||
"contributions": [
|
||||
"code",
|
||||
"ideas",
|
||||
"review",
|
||||
"test",
|
||||
"maintenance"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "coreybrown89",
|
||||
"name": "Corey Brown",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/12791148?v=4",
|
||||
"profile": "https://corey-brown.com",
|
||||
"contributions": [
|
||||
"code",
|
||||
"review",
|
||||
"maintenance"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "LoriKarikari",
|
||||
"name": "Lori Karikari",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/7902980?v=4",
|
||||
"profile": "https://github.com/LoriKarikari",
|
||||
"contributions": [
|
||||
"code",
|
||||
"review",
|
||||
"maintenance"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "eliasjohansson",
|
||||
"name": "Elias Johansson",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/22719177?v=4",
|
||||
"profile": "https://twitter.com/GeggsElias",
|
||||
"contributions": [
|
||||
"code",
|
||||
"review",
|
||||
"maintenance"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "medelman17",
|
||||
"name": "Michael Edelman ",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/14793389?v=4",
|
||||
"profile": "https://fabulas.io",
|
||||
"contributions": [
|
||||
"infra",
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "toddgeist",
|
||||
"name": "Todd Geist",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/316792?v=4",
|
||||
"profile": "http://www.geistinteractive.com",
|
||||
"contributions": [
|
||||
"financial"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "robdrosenberg",
|
||||
"name": "Robert Rosenberg",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/20813991?v=4",
|
||||
"profile": "http://robdrosenberg.com",
|
||||
"contributions": [
|
||||
"code",
|
||||
"maintenance",
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "quirk0o",
|
||||
"name": "Beata Obrok",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/5123725?v=4",
|
||||
"profile": "https://github.com/quirk0o",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "tsawan",
|
||||
"name": "Tahir Awan",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/3263082?v=4",
|
||||
"profile": "https://github.com/tsawan",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "camilo86",
|
||||
"name": "Camilo Gonzalez",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/2454632?v=4",
|
||||
"profile": "https://raluce.com",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "dkempner",
|
||||
"name": "Daniel Kempner",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/2532112?v=4",
|
||||
"profile": "http://da.nielkempner.com",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "gielcobben",
|
||||
"name": "Giel",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/2663212?v=4",
|
||||
"profile": "http://gielcobben.com",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "MrLeebo",
|
||||
"name": "Jeremy Liberman",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/2754163?v=4",
|
||||
"profile": "http://jeremyliberman.com/",
|
||||
"contributions": [
|
||||
"code",
|
||||
"maintenance",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "jimthedev",
|
||||
"name": "Jim Cummins",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/108938?v=4",
|
||||
"profile": "https://jimthedev.com",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Kristina Matuška",
|
||||
"avatar_url": "https://media-exp1.licdn.com/dms/image/C5603AQHVPAjV21gw9g/profile-displayphoto-shrink_200_200/0?e=1591228800&v=beta&t=0MlbmiYhNvGv1xjLD_fOhOFjVDZ7ltNwfGNeJ4DHedQ",
|
||||
"profile": "http://kristinamatuska.com/",
|
||||
"contributions": [
|
||||
"design"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "jasonblalock",
|
||||
"name": "Jason Blalock",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/5899929?v=4",
|
||||
"profile": "https://github.com/jasonblalock",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "aej11a",
|
||||
"name": "aej11a",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/10066422?v=4",
|
||||
"profile": "https://github.com/aej11a",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "marcoseoane",
|
||||
"name": "marcoseoane",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/28088807?v=4",
|
||||
"profile": "https://github.com/marcoseoane",
|
||||
"contributions": [
|
||||
"ideas"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "rishabhpoddar",
|
||||
"name": "Rishabh Poddar",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/2976287?v=4",
|
||||
"profile": "https://github.com/rishabhpoddar",
|
||||
"contributions": [
|
||||
"ideas"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "lorenzorapetti",
|
||||
"name": "Lorenzo Rapetti",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/2632174?v=4",
|
||||
"profile": "https://github.com/lorenzorapetti",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "wKovacs64",
|
||||
"name": "Justin Hall",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/1288694?v=4",
|
||||
"profile": "https://github.com/wKovacs64",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "sijad",
|
||||
"name": "Sajjad Hashemian",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/7693001?v=4",
|
||||
"profile": "https://github.com/sijad",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "ETLopes",
|
||||
"name": "Eduardo Lopes",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/34959471?v=4",
|
||||
"profile": "https://github.com/ETLopes",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "mattleff",
|
||||
"name": "Matthew Leffler",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/120155?v=4",
|
||||
"profile": "https://github.com/mattleff",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "hew",
|
||||
"name": "Matt",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/3103241?v=4",
|
||||
"profile": "https://hew.tools",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "sonnypgs",
|
||||
"name": "Sonny",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/1431300?v=4",
|
||||
"profile": "https://github.com/sonnypgs",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "Zeko369",
|
||||
"name": "Fran Zekan",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/3064377?v=4",
|
||||
"profile": "https://github.com/Zeko369",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "janbaykara",
|
||||
"name": "Jan Baykara",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/237556?v=4",
|
||||
"profile": "http://twitter.com/JanBaykara",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "mikeattara",
|
||||
"name": "Mike Perry Y Attara",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/31483629?v=4",
|
||||
"profile": "https://mikeattara.com",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "DevanB",
|
||||
"name": "Devan",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/354652?v=4",
|
||||
"profile": "https://devanthe.dev",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "jclancy93",
|
||||
"name": "Jack Clancy",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/7850202?v=4",
|
||||
"profile": "https://github.com/jclancy93",
|
||||
"contributions": [
|
||||
"code",
|
||||
"maintenance"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "ntgussoni",
|
||||
"name": "Nicolas Torres",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/10161067?v=4",
|
||||
"profile": "https://github.com/ntgussoni",
|
||||
"contributions": [
|
||||
"test",
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "skn0tt",
|
||||
"name": "Simon Knott",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/14912729?v=4",
|
||||
"profile": "http://simonknott.de",
|
||||
"contributions": [
|
||||
"code",
|
||||
"test",
|
||||
"maintenance"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "kandros",
|
||||
"name": "Jaga Santagostino",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/4562878?v=4",
|
||||
"profile": "http://jagascript.com",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc",
|
||||
"maintenance"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "jportela",
|
||||
"name": "João Portela",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/1010018?v=4",
|
||||
"profile": "http://www.joaoportela.com",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "dajinchu",
|
||||
"name": "Da-Jin Chu",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/7122182?v=4",
|
||||
"profile": "http://dajin.dev",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "Shinyaigeek",
|
||||
"name": "Shinobu Hayashi",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/42742053?v=4",
|
||||
"profile": "https://shinyaigeek.dev/",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "karankiri",
|
||||
"name": "Karan Kiri",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/19989161?v=4",
|
||||
"profile": "http://karankiri.com",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "fullmetalengineer",
|
||||
"name": "Alan Long",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/5294903?v=4",
|
||||
"profile": "https://github.com/fullmetalengineer",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "developerfred",
|
||||
"name": "codingsh",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/57037080?v=4",
|
||||
"profile": "http://codingsh.xyz",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "peaonunes",
|
||||
"name": "Rafael Nunes",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/3356720?v=4",
|
||||
"profile": "http://twitter.com/peaonunes",
|
||||
"contributions": [
|
||||
"review",
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "0ww",
|
||||
"name": "Simon Debbarma",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/31207418?v=4",
|
||||
"profile": "https://simonpeterdebbarma.com",
|
||||
"contributions": [
|
||||
"design",
|
||||
"maintenance",
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "0xflotus",
|
||||
"name": "0xflotus",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/26602940?v=4",
|
||||
"profile": "https://github.com/0xflotus",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "tmns",
|
||||
"name": "tmns",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/35785003?v=4",
|
||||
"profile": "https://dev.to/tmns",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "harris1717",
|
||||
"name": "Jru Harris",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/8636691?v=4",
|
||||
"profile": "http://jruharris.com",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "ivandevp",
|
||||
"name": "Ivan Medina",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/9284690?v=4",
|
||||
"profile": "https://twitter.com/ivandevp",
|
||||
"contributions": [
|
||||
"code",
|
||||
"maintenance"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "dwightwatson",
|
||||
"name": "Dwight Watson",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/1100408?v=4",
|
||||
"profile": "https://www.dwightwatson.com",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "is2ei",
|
||||
"name": "Horie Issei",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/3948353?v=4",
|
||||
"profile": "http://is2ei.com/",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "lednhatkhanh",
|
||||
"name": "Nhat Khanh",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/9303093?v=4",
|
||||
"profile": "https://twitter.com/lednhatkhanh",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "abuuzayr",
|
||||
"name": "Abu Uzayr",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/19371989?v=4",
|
||||
"profile": "https://builtforfifty.com",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "nabi009",
|
||||
"name": "Nabiullah elham",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/3170831?v=4",
|
||||
"profile": "https://github.com/nabi009",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "lachlanjc",
|
||||
"name": "Lachlan Campbell",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/5074763?v=4",
|
||||
"profile": "https://lachlanjc.com",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "enzoferey",
|
||||
"name": "Enzo Ferey",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/10673347?v=4",
|
||||
"profile": "http://enzoferey.com",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "pgrimaud",
|
||||
"name": "Pierre Grimaud",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/1866496?v=4",
|
||||
"profile": "https://github.com/pgrimaud",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "jletey",
|
||||
"name": "John Letey",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/62398724?v=4",
|
||||
"profile": "https://github.com/jletey",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "pixelmord",
|
||||
"name": "Andreas Adam",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/224168?v=4",
|
||||
"profile": "https://pixelmord.github.io",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "kevotovar",
|
||||
"name": "Kevin Tovar",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/15717067?v=4",
|
||||
"profile": "https://kevo.dev",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "anteprimorac",
|
||||
"name": "Ante Primorac",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/972083?v=4",
|
||||
"profile": "http://anteprimorac.com.hr",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "MykalMachon",
|
||||
"name": "Mykal Machon",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/7844994?v=4",
|
||||
"profile": "http://mykalmachon.dev",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "jamiedavenport",
|
||||
"name": "Jamie Davenport",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/1329874?v=4",
|
||||
"profile": "https://jamiedavenport.dev",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "ganeshmani",
|
||||
"name": "GaneshMani",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/17050715?v=4",
|
||||
"profile": "https://cloudnweb.dev/",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "reymon359",
|
||||
"name": "reymon359",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/31936665?v=4",
|
||||
"profile": "http://ramonmorcillo.com",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "gvasquez11",
|
||||
"name": "gvasquez11",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/36422346?v=4",
|
||||
"profile": "https://www.linkedin.com/in/gregory-vasquez-96413b184/",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "josemiguelo",
|
||||
"name": " José Miguel Ochoa",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/15330034?v=4",
|
||||
"profile": "https://github.com/josemiguelo",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "osirvent",
|
||||
"name": "Oscar Sirvent",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/5927133?v=4",
|
||||
"profile": "https://github.com/osirvent",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "donni106",
|
||||
"name": "Daniel Molnar",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/1942953?v=4",
|
||||
"profile": "https://github.com/donni106",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "exclipy",
|
||||
"name": "Kevin Wu Won",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/508799?v=4",
|
||||
"profile": "https://github.com/exclipy",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "tehnuge",
|
||||
"name": "John Duong",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/1928236?v=4",
|
||||
"profile": "https://github.com/tehnuge",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
}
|
||||
],
|
||||
"contributorsPerLine": 7,
|
||||
"skipCi": true
|
||||
}
|
||||
39
.eslintrc.js
Normal file
39
.eslintrc.js
Normal file
@@ -0,0 +1,39 @@
|
||||
module.exports = {
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
ecmaVersion: 6,
|
||||
sourceType: 'module',
|
||||
ecmaFeatures: {
|
||||
jsx: true,
|
||||
},
|
||||
project: `./tsconfig.json`,
|
||||
},
|
||||
plugins: ['@typescript-eslint', 'import', 'unicorn'],
|
||||
extends: ['react-app'],
|
||||
rules: {
|
||||
'react/react-in-jsx-scope': 'off', // React is always in scope with Blitz
|
||||
'jsx-a11y/anchor-is-valid': 'off', //Doesn't play well with Blitz/Next <Link> usage
|
||||
'import/first': 'off',
|
||||
'import/no-default-export': 'error',
|
||||
'require-await': 'error',
|
||||
'no-async-promise-executor': 'error',
|
||||
'unicorn/filename-case': [
|
||||
'error',
|
||||
{
|
||||
case: 'kebabCase',
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/no-floating-promises': 'error',
|
||||
},
|
||||
ignorePatterns: ['packages/cli/', 'packages/generator/templates'],
|
||||
overrides: [
|
||||
{
|
||||
files: ['examples/**', 'packages/gui/**'],
|
||||
rules: {
|
||||
'import/no-default-export': 'off',
|
||||
'unicorn/filename-case': 'off',
|
||||
'@typescript-eslint/no-floating-promises': 'off',
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
* text=auto eol=lf
|
||||
11
.github/CODEOWNERS
vendored
Normal file
11
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
|
||||
|
||||
* @flybayer
|
||||
*.md @merelinguist
|
||||
|
||||
packages/server/**/* @ryardley
|
||||
packages/file-pipeline/**/* @ryardley
|
||||
packages/cli/**/* @aem
|
||||
packages/generator/**/* @aem
|
||||
packages/gui/**/* @merelinguist
|
||||
packages/installer/**/* @aem
|
||||
4
.github/FUNDING.yml
vendored
Normal file
4
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
github: blitz-js
|
||||
custom: ['https://paypal.me/thebayers']
|
||||
open_collective: blitzjs
|
||||
patreon: flybayer
|
||||
23
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
23
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Something is not working right. Or error messages are unclear.
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
### What is the problem?
|
||||
|
||||
### Steps to Reproduce
|
||||
|
||||
1.
|
||||
|
||||
### Versions
|
||||
|
||||
```
|
||||
output of `blitz --version --verbose`
|
||||
```
|
||||
|
||||
### Other
|
||||
|
||||
Please include applicable logs and screenshots that show your problem.
|
||||
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Question or Discussion
|
||||
url: https://github.com/blitz-js/blitz/discussions/new
|
||||
about: Ask questions and discuss with other community members
|
||||
19
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
19
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
name: Feature/change request
|
||||
about: Something new or better!
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
### What do you want and why?
|
||||
|
||||
The more information the better!
|
||||
|
||||
### Possible implementation(s)
|
||||
|
||||
How might we do this?
|
||||
|
||||
### Additional context
|
||||
|
||||
Add any other context or screenshots about the feature request here.
|
||||
10
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
10
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
Closes: ??
|
||||
|
||||
### What are the changes and their implications?
|
||||
|
||||
### Checklist
|
||||
|
||||
- [ ] Tests added for changes
|
||||
- [ ] PR submitted to [blitzjs.com](https://github.com/blitz-js/blitzjs.com) for any user facing changes
|
||||
|
||||
<!-- IMPORTANT: Make sure to check the "Allow edits from maintainers" box below this window -->
|
||||
18
.github/checkInstallTime.js
vendored
Executable file
18
.github/checkInstallTime.js
vendored
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const fs = require('fs')
|
||||
const yarnOut = fs.readFileSync(0, {encoding: 'utf8'})
|
||||
|
||||
const [installTimeString] = /(?<=^Done in )\d+\.\d+(?=s\.$)/m.exec(yarnOut)
|
||||
const installTime = Number(installTimeString)
|
||||
|
||||
console.log(`Install time: ${installTime}s`)
|
||||
|
||||
if (installTime < 30) {
|
||||
console.log("We're below 30 secs. That's awesome!")
|
||||
} else if (installTime < 50) {
|
||||
console.log("We're below 50 secs. That's fine!")
|
||||
} else {
|
||||
console.log("We're above 50 secs. That's not great!")
|
||||
process.exit(1)
|
||||
}
|
||||
62
.github/workflows/main.yml
vendored
Normal file
62
.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
name: Continuous Integration
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- canary
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- canary
|
||||
|
||||
jobs:
|
||||
check_install_time:
|
||||
name: Check install time
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12.16.1'
|
||||
- name: Test Install time
|
||||
run: |
|
||||
cd ../ && mkdir test && cd test
|
||||
yarn add file:../blitz/packages/blitz --non-interactive | tee out.txt
|
||||
cat out.txt | ../blitz/.github/checkInstallTime.js
|
||||
|
||||
build_and_test:
|
||||
name: Build & Test
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12.16.1'
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- name: Cache Node.js modules
|
||||
id: yarn-cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile --silent
|
||||
env:
|
||||
CI: true
|
||||
- name: Setup kernel to increase watchers
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
|
||||
- name: Test Blitz Packages
|
||||
run: yarn test
|
||||
env:
|
||||
CI: true
|
||||
24
.gitignore
vendored
Normal file
24
.gitignore
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
.log
|
||||
.DS_Store
|
||||
.jest-*
|
||||
lib
|
||||
node_modules
|
||||
reports
|
||||
*.log
|
||||
.nyc_output
|
||||
**/coverage
|
||||
.yarn
|
||||
.yarnrc
|
||||
tsconfig.tsbuildinfo
|
||||
.blitz
|
||||
.next
|
||||
dist
|
||||
.now
|
||||
# local env files
|
||||
**/.envrc
|
||||
**/.env
|
||||
**/.env.local
|
||||
**/.env.development.local
|
||||
**/.env.test.local
|
||||
**/.env.production.local
|
||||
.blitz-*
|
||||
16
.npmignore
Normal file
16
.npmignore
Normal file
@@ -0,0 +1,16 @@
|
||||
.DS_Store
|
||||
.prettierrc
|
||||
.nyc_output
|
||||
.travis.yml
|
||||
coverage
|
||||
coverage.lcov
|
||||
bench
|
||||
docs
|
||||
src
|
||||
examples
|
||||
babel.config.js
|
||||
test
|
||||
CONTRIBUTING.md
|
||||
CODE_OF_CONDUCT.md
|
||||
*.ts
|
||||
!*.d.ts
|
||||
20
.prettierignore
Normal file
20
.prettierignore
Normal file
@@ -0,0 +1,20 @@
|
||||
**/migrations/**
|
||||
.blitz
|
||||
.next
|
||||
.log
|
||||
.DS_Store
|
||||
.jest-*
|
||||
lib
|
||||
node_modules
|
||||
reports
|
||||
*.log
|
||||
**/.env*
|
||||
.nyc_output
|
||||
**/coverage
|
||||
.yarn
|
||||
.yarnrc
|
||||
tsconfig.tsbuildinfo
|
||||
dist
|
||||
bin
|
||||
packages/generator/templates/**
|
||||
.github/ISSUE_TEMPLATE/bug_report.md
|
||||
9
BACKERS.md
Normal file
9
BACKERS.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Bronze Sponsors of Blitz.js
|
||||
|
||||
A huge thank you to our bronze sponsors!
|
||||
|
||||
<br>
|
||||
|
||||
<a aria-label="Fauna" href="https://dashboard.fauna.com/accounts/register?utm_source=BlitzJS&utm_medium=sponsorship&utm_campaign=BlitzJS_Sponsorship_2020">
|
||||
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/canary/assets/Fauna_Logo_Blue.png" width="300px">
|
||||
</a>
|
||||
3
CODE_OF_CONDUCT.md
Normal file
3
CODE_OF_CONDUCT.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# The Blitz Community Code of Conduct
|
||||
|
||||
[Read the Code of Conduct at Blitzjs.com](https://blitzjs.com/docs/code-of-conduct)
|
||||
3
CONTRIBUTING.md
Normal file
3
CONTRIBUTING.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Contributing
|
||||
|
||||
[Read the Contributing Guide at Blitzjs.com](https://blitzjs.com/docs/contributing)
|
||||
11
GOVERNANCE.md
Normal file
11
GOVERNANCE.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Blitz.js Governance
|
||||
|
||||
_From Brandon Bayer (@flybayer), the creator:_
|
||||
|
||||
Currently at this very early stage it's basically a [BDFL situation](https://opensource.guide/leadership-and-governance/#what-are-some-of-the-common-governance-structures-for-open-source-projects), with me having the final say in decisions.
|
||||
|
||||
However we will move away from BDFL to something that looks more like Ember.js. It's extremely important to me (Brandon) that Blitz.js is a long-term, sustainable, and community-run project.
|
||||
|
||||
I would love some mentorship from people with experience in large open-source projects on making this transition.
|
||||
|
||||
Also, it's possible I will create one or more business around Blitz, perhaps similar to how Taylor Otwell has around Laravel, but Blitz itself will always remain a separate community-run project.
|
||||
104
MAINTAINERS.md
Normal file
104
MAINTAINERS.md
Normal file
@@ -0,0 +1,104 @@
|
||||
# ❤️ Blitz Maintainers
|
||||
|
||||
Aside from the core team, there are two levels of maintainers, described below.
|
||||
|
||||
## Becoming a Maintainer
|
||||
|
||||
We always need more level 1 maintainers! The main requirement is that you can show empathy when communicating online. We'll train you as needed on the other specifics. **This is a great role if you have limited time, because you can spend just as much time as you have without any ongoing responsibilities (unlike level 2)**
|
||||
|
||||
Level 2 maintainers have a much higher responsibility, so usually you will spend time as a level 1 maintainer before moving to level 2.
|
||||
|
||||
Please DM a core team member (Brandon Bayer, Rudi Yardley, or Dylan Brookes) in Slack if you're interested in becoming an official maintainer!
|
||||
|
||||
## Level 1 Maintainers
|
||||
|
||||
Level 1 maintainers are critical for a healthy Blitz community and project. They take a lot of burden off the core team and level 2 maintainers so they can focus on higher level things with longer term impact.
|
||||
|
||||
The primary responsibilities of level 1 maintainers are:
|
||||
|
||||
- Being a friendly, welcoming voice for the Blitz community
|
||||
- Issue triage
|
||||
- Pull request triage
|
||||
- Monitor and answer the `#-help` slack channel
|
||||
- Community encouragement
|
||||
- Community moderation
|
||||
- Tracking and ensuring progress of key issues
|
||||
|
||||
## Level 2 Maintainers
|
||||
|
||||
Level 2 maintainers are the backbone of the project. They are watchdogs over the code, ensuring code quality, correctness, and security. They also facilitate a rapid pace of progress.
|
||||
|
||||
The primary responsibilities of level 2 maintainers are:
|
||||
|
||||
- Code ownership over specific parts of the project
|
||||
- Maintaining and improving the architecture of what they own
|
||||
- Final pull request reviews
|
||||
- Merging pull requests
|
||||
- Tracking and ensuring progress of open pull requests
|
||||
|
||||
## ⚠️ Fundamentals
|
||||
|
||||
Maintainers are the face of the project and the front-line touch point for the community. Therefore maintainers have the very important responsibility of making people feel welcome, valued, understood, and appreciated.
|
||||
|
||||
**Please take time to read and understand everything outlined in this [guide on building welcoming communities](https://opensource.guide/building-community)**
|
||||
|
||||
Some especially important points:
|
||||
|
||||
- **Gratitude:** immediately express gratitude when someone opens an issue or PR. This takes effort/time and we appreciate it
|
||||
- **Responsiveness:** during issue/PR triage, even if we can’t do a full review right away, leave a comment thanking them and saying we’ll review it soon
|
||||
- **Understanding:** it's critical to ensure you understand exactly what someone is saying before you respond. Ask plenty of questions if needed. It's very bad if someone has to reply to your response and say "actually I was asking about X"
|
||||
- In fact, at least one question is almost always required before you can respond appropriately — whether in Github or in Slack
|
||||
|
||||
## Slack
|
||||
|
||||
- All `#-*` channels are for Blitz users
|
||||
- All `#dev-*` channels are for Blitz internal development
|
||||
|
||||
If someone that's not a maintainer post in the wrong area, that's fine. Don't tell them they posted in the wrong place. But as a maintainer, you should for sure post in the right channel :)
|
||||
|
||||
## Issue Triage
|
||||
|
||||
#### If a bug report:
|
||||
|
||||
- Does it have enough information? Versions? Logs? Some way to reproduce?
|
||||
- Has this already been fixed in a previous release?
|
||||
- Is there already an existing issue for this?
|
||||
|
||||
### If a feature/change request:
|
||||
|
||||
- Is it clear what the request is and what the benefit will be?
|
||||
- Is this an obvious win for Blitz? Then accept it
|
||||
- If not obvious, then pull in a core team member or level 2 maintainer for more review
|
||||
|
||||
### Actions
|
||||
|
||||
1. Add tags:
|
||||
- Add a `kind/*` tag
|
||||
- Add a `scope/*` tag
|
||||
- Add a `status/*` tag
|
||||
- Add a good first/second issue tag if appropriate
|
||||
|
||||
## Pull Request Triage
|
||||
|
||||
- Are the changes covered by tests?
|
||||
- Do the changes look ok? Make sure there's no obvious issues
|
||||
|
||||
### Actions
|
||||
|
||||
1. Kindly request any changes if needed
|
||||
2. Else add a Github approval so that level 2 maintainers know it's already had an initial review
|
||||
|
||||
## Final PR Review & Merging (Level 2 maintainers)
|
||||
|
||||
As a level 2 maintainer, it is your responsibility to make sure broken code and regressions never reach the canary branch.
|
||||
|
||||
1. Ensure the PR'ed code fully works as intended and that there are no regressions in related code
|
||||
1. If not fully covered by automated tests, you need to pull down the code locally and manually verify everything (the Github CLI helps with this!)
|
||||
2. During squash & merge:
|
||||
1. Change the commit title to be public friendly - this exact text will go in the release notes
|
||||
2. Add the commit type in the description, in parenthesis like `(patch)`. Commit types:
|
||||
- `major` - major breaking change
|
||||
- `minor` - minor feature addition
|
||||
- `patch` - patches, bug fixes, perf improvements, etc
|
||||
- `example` - change to an example app
|
||||
- `meta` - internal meta change related to the Blitz repo/project
|
||||
3
MANIFESTO.md
Normal file
3
MANIFESTO.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Manifesto
|
||||
|
||||
[The Manifesto has been moved to Blitzjs.com](https://blitzjs.com/docs/manifesto)
|
||||
65
MEETING_NOTES.md
Normal file
65
MEETING_NOTES.md
Normal file
@@ -0,0 +1,65 @@
|
||||
# 2020-06-09 Blitz Contributor Call
|
||||
|
||||
# Blitz Contributor Call Meeting Notes June 9, 2020
|
||||
|
||||
- Attending: Brandon Bayer, Rudi Yardley, Fran Zekan, Adam Markon, Robert Rosenberg, Kristina Matuska
|
||||
- Brandon:
|
||||
- blitzjs.com published, docs + marketing site v0.1 live
|
||||
- For now most of the docs copied from react-query and Next, we should eventually clean them up so they're stylistically similar to ours, but really easy to start
|
||||
- HTTP middleware is almost done, just fixing a few edge cases
|
||||
- Authentication is up next after that, translating pseudocode into actual code
|
||||
- Kristina:
|
||||
- Homepage design mostly wrapped up right now, have to finish up mobile and light mode and then ready to move on to the rest of the docs
|
||||
- Syntax highlighting, we can customize colors
|
||||
- Sidebar inspiration from tailwindcss
|
||||
- Robert:
|
||||
- Decided to wait to convert existing components to theme UI until the final design is done
|
||||
- More docs content:
|
||||
- More guides
|
||||
- Improve the tutorial to incorporate relationship generation
|
||||
- Add branches for canary and master
|
||||
- If you add a feature you can add your documentation to the canary branch
|
||||
- Adam:
|
||||
- blitz generate model finished!
|
||||
- Installer rewrite complete
|
||||
- At similar place to what Gatsby has for installing stuff
|
||||
- Next up:
|
||||
- Support gatsby MDX recipes
|
||||
- Make all code generators aware of actual model attributes
|
||||
- Fran:
|
||||
- Working on a package for getting the blitz config anywhere - getConfig()
|
||||
- Prevent app from "warming" the server when deployed as server rather than serverless
|
||||
- Testing examples - e2e with cypress and unit tests with Jest so we can link to a testing setup in the docs/getting started guide
|
||||
- Rudi:
|
||||
- Extracted out the @blitzjs/file-pipeline (previously synchronizer)
|
||||
- Extracted out the @blitzjs/display package
|
||||
- Working on various Next.js compatibility issues
|
||||
- Debugging a bug in blitz start where it gets stuck at \_manifest.json
|
||||
|
||||
# 2020-05-26 Blitz Contributor Call
|
||||
|
||||
- Attending: Brandon Bayer, Robert Rosenberg, Adam Markon, Simon Debbarma
|
||||
- Brandon:
|
||||
- Kitze livestream last week went great — recording on youtube
|
||||
- Codebase walkthrough yesterday went great — recording on youtube
|
||||
- Website overhaul, installed Theme UI
|
||||
- Adam:
|
||||
- Opened PR for Prisma model generation from the CLI
|
||||
- Working on Installer stuff and prepping for integration with Gatsby recipes
|
||||
- Simon
|
||||
- Working on custom illustrations for the web
|
||||
- Robert
|
||||
- Misc work on website
|
||||
- Website
|
||||
- Most website components are owned by us now instead of docusaurus, we'll need to be weary of api updates and any other important component updates
|
||||
- Make sidebar like tailwind docs sidebar
|
||||
- Dark theme needs to be fixed
|
||||
- Theme switcher inconsistent
|
||||
- Live code sandbox examples
|
||||
- Code comparison between blitz and rails
|
||||
- Auth
|
||||
- Rishabh continuing to work on pseudo code for the session management library
|
||||
- Brandon planning to build http middleware support this week
|
||||
- CLI
|
||||
- Adam working on new features, including generating prisma models and making existing templates aware of actual model attributes
|
||||
- Plugin ideas / discussion once recipes are farther along. Will post an RFC for plugins at some point
|
||||
298
README.md
298
README.md
@@ -1,2 +1,296 @@
|
||||
# blitz
|
||||
Framework for building monolithic, full-stack, serverless React apps with zero data-fetching and zero client-side state management
|
||||
[](https://blitzjs.com)
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
<p align="center">
|
||||
<a aria-label="Join our Slack Community" href="https://slack.blitzjs.com">
|
||||
<img alt="" src="https://img.shields.io/badge/Join%20our%20community-6700EB.svg?style=for-the-badge&labelColor=000000&logoWidth=20&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAQ9SURBVHgB7d3dVdtAEIbhcSpICUoH0IEogQqSVBBSAU4FSSpIOoAORAfQgSghHXzZ1U/YcMD4R9rZmf2ec3y448LyiNf27iLiGIAmPLrweC9Un3DhrzG6EarLNP09nlwJ1SOZ/lQr5N80/S/p2QMVCBf5N17XCfm1Y/rBHqjAG9PPHvBsz+mf9WAP+HLA9M/YA14cOP2payH7jpj+VCtk1wnTP+vj7xCy6cTpn7EHLMLp059iD1iD8eveJbVCNsSLheX1YA/YgOWnf8YeKB3Wmf7Ud6Fy4f/FHmtpxbl3YlC4MJ/Cj0bWdwPnPbARg+L0S54XQHS32WwuxClzd4CM0z9rPfeAuTtA5ulPXYQ7wZ04Y+oOoDD9KZc9YOoOoDj9s4dwFzgXR6w1wIPoOvPWA9buAHEJ173o3gWiy3AnuBUHLEbgmYwvAk1/wuM8vAgexThzbwPDkx7/DHwVXfFOxP2GmsKd4Ab6zPeAyU8CI7AHFmH2BRCBPXAyk18GzUrqAXCTiR4ssyj0VFw/oCU8+e+RZ33AWz6KMaYbIIWxB+JSLs1bsbkeMN0AqakHvoku9oA2sAfqBvbAQdw0QArsgb25aYBUQT3QgT2gB+yBuqGcHij2UCqXDZACe2Anlw2QYg/QAOyBuoE98CL3DZDCuK4/rh/Q7oGL6U+TOvcNkJoijN8X1C48+T+g75eQDrAH/qmqAVJgDwyqaoAUe4AGYA/UDZX3QLUNkEIZPRCd5+6BahsgVUgPROwBTSijB7jpVAvGHriHvmw9wAZ4BpX1ABvgmakHtPcbRuwBTWAPULgAV9D/jKDY9YRvwvgEaurD44uQHvAol7qBW7WKluVtIHiUS7GyvA0s6CiXDnxrpQfsgbqBS7GKk/2jYHCrVlGyfxTMrVo0ALdq1Q3sgSKofh0M9oA61a+D2QM0AHugbmAPqClmSRjK2apVVQ8UsySsoK1aHdgDesCtWnUDeyCrIpeFg1u3sylyWTi3btMA7IG6gT2wuuK3hoE9sKrit4YVslWLPaAN7IG6ocKt2zmY2h4O9sDiTG0PZw/QANy6XTewBxZj9ogYVHy025LMHhEz9cBn0We6B0yfERReBLfhx0/R1YQHPx/QBPbA0VwcEwf2wNFcHBPHHjiem3MC2QPHcXdSaJjA+KfgTPQ8hhfjBzHC40mhlzJ+Xq9lK4a4PCs43AVaGTed5mZq+iOXZwWHi3AnOj2wFWNcnxYe7gTxLtBKHuamP/J+Wnh8a5irB7ZC5Yk9gPX1QuXC+usHWqGyhYvUYR0a7zboUOFCNVhnk0krZAOW7wFOvzXhom2xnEbIHizTA1wEYhWW6YFGyC6c1gOcfg9wfA80Qj7g8B7g9HuCww+haIR8wf49wOn3Cvv9k8tGyC/s7gFOv3fY3QONkH+v9MBWqB7PeqDn9FcIT//kcitUn6kHOu/T/xfWzlQy3dEHhwAAAABJRU5ErkJggg==">
|
||||
</a>
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
||||
<a aria-label="All Contributors" href="#contributors-"><img alt="" src="https://img.shields.io/badge/all_contributors-71-17BB8A.svg?style=for-the-badge&labelColor=000000"></a>
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
||||
<a aria-label="License" href="https://github.com/blitz-js/blitz/blob/canary/LICENSE">
|
||||
<img alt="" src="https://img.shields.io/npm/l/blitz.svg?style=for-the-badge&labelColor=000000&color=blue">
|
||||
</a>
|
||||
<a aria-label="NPM version" href="https://www.npmjs.com/package/blitz">
|
||||
<img alt="" src="https://img.shields.io/npm/v/blitz.svg?style=for-the-badge&labelColor=000000&color=E65528">
|
||||
</a>
|
||||
</p>
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
<br>
|
||||
|
||||
<h1 align="center">The Fullstack React Framework</h1>
|
||||
|
||||
<h3 align="center">Built on Next.js — Inspired by Ruby on Rails — New Fullstack Data Layer</h3>
|
||||
<h3 align="center"><a href="https://blitzjs.com" target="_blank">Read the Documentation</a></h3>
|
||||
<br>
|
||||
|
||||
New “no-API” data layer **lets you import server code into your React components** instead of having to fetch from an API.
|
||||
|
||||
Includes everything you need for production apps. **Everything end-to-end from the database to the frontend.**
|
||||
|
||||
Blitz brings back the **simplicity and conventions** of server-rendered frameworks like Ruby on Rails while preserving everything we love about React and client-side rendering!
|
||||
|
||||
<br>
|
||||
|
||||
### Quick Start
|
||||
|
||||
You need Node.js 12 or newer
|
||||
|
||||
#### Install Blitz
|
||||
|
||||
Run `npm install -g blitz`
|
||||
|
||||
#### Create a New App
|
||||
|
||||
1. `blitz new myAppName`
|
||||
2. `cd myAppName`
|
||||
3. `blitz start`
|
||||
4. View your baby app at http://localhost:3000
|
||||
|
||||
<br><br>
|
||||
|
||||

|
||||
|
||||
<br><br>
|
||||
|
||||
**Features:**<br>
|
||||
⚡️ Built on Next.js<br>
|
||||
⚡️ Don't have to build an API for client-side rendering<br>
|
||||
⚡️ Client-side rendering, Server-side rendering, and fully static pages all in the same app<br>
|
||||
⚡️ Full Typescript support with static, end-to-end typing (no code generation step needed like with GraphQL)<br>
|
||||
⚡️ React Concurrent Mode enabled<br>
|
||||
⚡️ Database/ORM agnostic, but Prisma 2 is default<br>
|
||||
⚡️ CLI with code scaffolding, Rails-style console REPL, etc<br>
|
||||
⚡️ GraphQL Ready<br>
|
||||
⚡️ Deploy serverless or serverful<br>
|
||||
|
||||
**Other key features coming:**<br>
|
||||
⚡️ Highly secure authentication <br>
|
||||
⚡️ Authorization you can use on both server and client<br>
|
||||
⚡️ Model validation you can use on both server and client<br>
|
||||
⚡️ Plugins for easily adding libraries like Tailwind, CSS-in-JS, etc.<br>
|
||||
⚡️ React native support<br>
|
||||
⚡️ GUI so you don't have to use the CLI<br>
|
||||
|
||||
<br>
|
||||
|
||||
### The Foundational Principles
|
||||
|
||||
1. Fullstack & Monolithic
|
||||
2. API Not Required
|
||||
3. Convention over Configuration
|
||||
4. Loose Opinions
|
||||
5. Easy to Start, Easy to Scale
|
||||
6. Stability
|
||||
7. Community over Code
|
||||
|
||||
[The Blitz Manifesto](https://blitzjs.com/docs/manifesto) explains these principles in detail.
|
||||
|
||||
<br>
|
||||
|
||||
### What is Blitz Designed For?
|
||||
|
||||
Blitz is designed for tiny to large database-backed applications that have one or more graphical user interfaces.
|
||||
|
||||
While we currently only support web, we are pursuing the dream of a single monolithic application that runs on web and mobile with maximum code sharing and minimal boilerplate.
|
||||
|
||||
<br>
|
||||
|
||||
## Welcome to the Blitz Community 👋
|
||||
|
||||
The Blitz community is warm, safe, diverse, inclusive, and fun! LGBTQ+, women, and minorities are especially welcome. Please read our [Code of Conduct](https://blitzjs.com/docs/code-of-conduct).
|
||||
|
||||
[Join our Slack Community](https://slack.blitzjs.com) where we help each other build Blitz apps. It's also where we collaborate on building Blitz itself.
|
||||
|
||||
For questions and longer form discussions, [post in our forum](https://github.com/blitz-js/blitz/discussions).
|
||||
|
||||
There's still a lot of work to do, so you are especially invited to join us in building Blitz! A good place to start is [The Contributing Guide](https://blitzjs.com/docs/contributing).
|
||||
|
||||
<br>
|
||||
|
||||
## Sponsors and Donations
|
||||
|
||||
- Contribute via [GitHub Sponsors](https://github.com/sponsors/blitz-js)
|
||||
- Contribute via [PayPal](https://paypal.me/thebayers)
|
||||
- Contribute via [Open Collective](https://opencollective.com/blitzjs)
|
||||
- Contribute via [Patreon](https://patreon.com/flybayer)
|
||||
|
||||
_Sponsor Blitz and display your logo and hiring status here. This is a great way to get in front of early adopters!_
|
||||
|
||||
[View our Bronze Sponsors](https://github.com/blitz-js/blitz/blob/canary/BACKERS.md)
|
||||
|
||||
<br>
|
||||
|
||||
## Core Team ✨
|
||||
|
||||
<!-- markdownlint-disable -->
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center"><a href="https://twitter.com/flybayer"><img src="https://avatars3.githubusercontent.com/u/8813276?v=4" width="100px;" alt=""/><br /><sub><b>Brandon Bayer</b></sub></a><br />Creator</td>
|
||||
<td align="center"><a href="https://medium.com/@ryardley"><img src="https://avatars0.githubusercontent.com/u/1256409?v=4" width="100px;" alt=""/><br /><sub><b>Rudi Yardley</b></sub></a><br />Node.js Wizard</td>
|
||||
<td align="center"><a href="https://merelinguist.now.sh"><img src="https://avatars3.githubusercontent.com/u/24858006?v=4" width="100px;" alt=""/><br /><sub><b>Dylan Brookes</b></sub></a><br />Friendly Generalist</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- markdownlint-enable -->
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
## Maintainers (Level 2) ✨
|
||||
|
||||
_Code ownership, pull request approvals and merging, etc_ (see [MAINTAINERS.md](./MAINTAINERS.md))
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
<!-- markdownlint-disable -->
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center"><a href="https://github.com/aem"><img src="https://avatars0.githubusercontent.com/u/1909883?v=4" width="100px;" alt=""/><br /><sub><b>Adam Markon</b></sub></a><br />CLI</td>
|
||||
<td align="center"><a href="http://robdrosenberg.com"><img src="https://avatars0.githubusercontent.com/u/20813991?v=4" width="100px;" alt=""/><br /><sub><b>Robert Rosenberg</b></sub></a><br />Website/Docs</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- markdownlint-enable -->
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
<br>
|
||||
|
||||
## Maintainers (Level 1) ✨
|
||||
|
||||
_Issue triage, pull request triage, community encouragement and moderation, etc_ (see [MAINTAINERS.md](./MAINTAINERS.md))
|
||||
|
||||
We need more woman & nonbinary level 1 maintainers. See [MAINTAINERS.md](./MAINTAINERS.md) for what this entails
|
||||
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
<!-- markdownlint-disable -->
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center"><a href="https://github.com/LoriKarikari"><img src="https://avatars1.githubusercontent.com/u/7902980?v=4" width="100px;" alt=""/><br /><sub><b>Lori Karikari</b></sub></a></td>
|
||||
<td align="center"><a href="https://corey-brown.com"><img src="https://avatars1.githubusercontent.com/u/12791148?v=4" width="100px;" alt=""/><br /><sub><b>Corey Brown</b></sub></a></td>
|
||||
<td align="center"><a href="http://simonknott.de"><img src="https://avatars1.githubusercontent.com/u/14912729?v=4" width="100px;" alt=""/><br /><sub><b>Simon Knott</b></sub></a></td>
|
||||
<td align="center"><a href="https://twitter.com/GeggsElias"><img src="https://avatars3.githubusercontent.com/u/22719177?v=4" width="100px;" alt=""/><br /><sub><b>Elias Johansson</b></sub></a></td>
|
||||
<td align="center"><a href="http://jeremyliberman.com/"><img src="https://avatars3.githubusercontent.com/u/2754163?v=4" width="100px;" alt=""/><br /><sub><b>Jeremy Liberman</b></td>
|
||||
<td align="center"><a href="http://jagascript.com"><img src="https://avatars0.githubusercontent.com/u/4562878?v=4" width="100px;" alt=""/><br /><sub><b>Jaga Santagostino</b></sub></a></td>
|
||||
<td align="center"><a href="https://simonpeterdebbarma.com"><img src="https://avatars3.githubusercontent.com/u/31207418?v=4" width="100px;" alt=""/><br /><sub><b>Simon Debbarma</b></sub></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://github.com/jclancy93"><img src="https://avatars2.githubusercontent.com/u/7850202?v=4" width="100px;" alt=""/><br /><sub><b>Jack Clancy</b></sub></a></td>
|
||||
<td align="center"><a href="https://twitter.com/ivandevp"><img src="https://avatars3.githubusercontent.com/u/9284690?v=4" width="100px;" alt=""/><br /><sub><b>Ivan Medina</b></sub></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- markdownlint-enable -->
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
## Contributors ✨
|
||||
|
||||
Thanks 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 -->
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center"><a href="https://twitter.com/flybayer"><img src="https://avatars3.githubusercontent.com/u/8813276?v=4" width="100px;" alt=""/><br /><sub><b>Brandon Bayer</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=flybayer" title="Code">💻</a> <a href="#content-flybayer" title="Content">🖋</a> <a href="#ideas-flybayer" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/blitz-js/blitz/pulls?q=is%3Apr+reviewed-by%3Aflybayer" title="Reviewed Pull Requests">👀</a></td>
|
||||
<td align="center"><a href="https://medium.com/@ryardley"><img src="https://avatars0.githubusercontent.com/u/1256409?v=4" width="100px;" alt=""/><br /><sub><b>Rudi Yardley</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=ryardley" title="Code">💻</a> <a href="#ideas-ryardley" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/blitz-js/blitz/pulls?q=is%3Apr+reviewed-by%3Aryardley" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/blitz-js/blitz/commits?author=ryardley" title="Tests">⚠️</a></td>
|
||||
<td align="center"><a href="https://merelinguist.me"><img src="https://avatars3.githubusercontent.com/u/24858006?v=4" width="100px;" alt=""/><br /><sub><b>Dylan Brookes</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=merelinguist" title="Code">💻</a> <a href="#ideas-merelinguist" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/blitz-js/blitz/pulls?q=is%3Apr+reviewed-by%3Amerelinguist" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/blitz-js/blitz/commits?author=merelinguist" title="Tests">⚠️</a> <a href="https://github.com/blitz-js/blitz/commits?author=merelinguist" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="https://github.com/aem"><img src="https://avatars0.githubusercontent.com/u/1909883?v=4" width="100px;" alt=""/><br /><sub><b>Adam Markon</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=aem" title="Code">💻</a> <a href="#ideas-aem" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/blitz-js/blitz/pulls?q=is%3Apr+reviewed-by%3Aaem" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/blitz-js/blitz/commits?author=aem" title="Tests">⚠️</a> <a href="#maintenance-aem" title="Maintenance">🚧</a></td>
|
||||
<td align="center"><a href="https://corey-brown.com"><img src="https://avatars1.githubusercontent.com/u/12791148?v=4" width="100px;" alt=""/><br /><sub><b>Corey Brown</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=coreybrown89" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/pulls?q=is%3Apr+reviewed-by%3Acoreybrown89" title="Reviewed Pull Requests">👀</a> <a href="#maintenance-coreybrown89" title="Maintenance">🚧</a></td>
|
||||
<td align="center"><a href="https://github.com/LoriKarikari"><img src="https://avatars1.githubusercontent.com/u/7902980?v=4" width="100px;" alt=""/><br /><sub><b>Lori Karikari</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=LoriKarikari" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/pulls?q=is%3Apr+reviewed-by%3ALoriKarikari" title="Reviewed Pull Requests">👀</a> <a href="#maintenance-LoriKarikari" title="Maintenance">🚧</a></td>
|
||||
<td align="center"><a href="https://twitter.com/GeggsElias"><img src="https://avatars3.githubusercontent.com/u/22719177?v=4" width="100px;" alt=""/><br /><sub><b>Elias Johansson</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=eliasjohansson" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/pulls?q=is%3Apr+reviewed-by%3Aeliasjohansson" title="Reviewed Pull Requests">👀</a> <a href="#maintenance-eliasjohansson" title="Maintenance">🚧</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://fabulas.io"><img src="https://avatars1.githubusercontent.com/u/14793389?v=4" width="100px;" alt=""/><br /><sub><b>Michael Edelman </b></sub></a><br /><a href="#infra-medelman17" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/blitz-js/blitz/commits?author=medelman17" title="Code">💻</a></td>
|
||||
<td align="center"><a href="http://www.geistinteractive.com"><img src="https://avatars2.githubusercontent.com/u/316792?v=4" width="100px;" alt=""/><br /><sub><b>Todd Geist</b></sub></a><br /><a href="#financial-toddgeist" title="Financial">💵</a></td>
|
||||
<td align="center"><a href="http://robdrosenberg.com"><img src="https://avatars0.githubusercontent.com/u/20813991?v=4" width="100px;" alt=""/><br /><sub><b>Robert Rosenberg</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=robdrosenberg" title="Code">💻</a> <a href="#maintenance-robdrosenberg" title="Maintenance">🚧</a> <a href="https://github.com/blitz-js/blitz/commits?author=robdrosenberg" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="https://github.com/quirk0o"><img src="https://avatars3.githubusercontent.com/u/5123725?v=4" width="100px;" alt=""/><br /><sub><b>Beata Obrok</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=quirk0o" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/tsawan"><img src="https://avatars3.githubusercontent.com/u/3263082?v=4" width="100px;" alt=""/><br /><sub><b>Tahir Awan</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=tsawan" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://raluce.com"><img src="https://avatars1.githubusercontent.com/u/2454632?v=4" width="100px;" alt=""/><br /><sub><b>Camilo Gonzalez</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=camilo86" title="Code">💻</a></td>
|
||||
<td align="center"><a href="http://da.nielkempner.com"><img src="https://avatars3.githubusercontent.com/u/2532112?v=4" width="100px;" alt=""/><br /><sub><b>Daniel Kempner</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=dkempner" title="Code">💻</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="http://gielcobben.com"><img src="https://avatars0.githubusercontent.com/u/2663212?v=4" width="100px;" alt=""/><br /><sub><b>Giel</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=gielcobben" title="Code">💻</a></td>
|
||||
<td align="center"><a href="http://jeremyliberman.com/"><img src="https://avatars3.githubusercontent.com/u/2754163?v=4" width="100px;" alt=""/><br /><sub><b>Jeremy Liberman</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=MrLeebo" title="Code">💻</a> <a href="#maintenance-MrLeebo" title="Maintenance">🚧</a> <a href="https://github.com/blitz-js/blitz/commits?author=MrLeebo" title="Tests">⚠️</a></td>
|
||||
<td align="center"><a href="https://jimthedev.com"><img src="https://avatars0.githubusercontent.com/u/108938?v=4" width="100px;" alt=""/><br /><sub><b>Jim Cummins</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=jimthedev" title="Code">💻</a></td>
|
||||
<td align="center"><a href="http://kristinamatuska.com/"><img src="https://media-exp1.licdn.com/dms/image/C5603AQHVPAjV21gw9g/profile-displayphoto-shrink_200_200/0?e=1591228800&v=beta&t=0MlbmiYhNvGv1xjLD_fOhOFjVDZ7ltNwfGNeJ4DHedQ" width="100px;" alt=""/><br /><sub><b>Kristina Matuška</b></sub></a><br /><a href="#design" title="Design">🎨</a></td>
|
||||
<td align="center"><a href="https://github.com/jasonblalock"><img src="https://avatars0.githubusercontent.com/u/5899929?v=4" width="100px;" alt=""/><br /><sub><b>Jason Blalock</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=jasonblalock" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/aej11a"><img src="https://avatars2.githubusercontent.com/u/10066422?v=4" width="100px;" alt=""/><br /><sub><b>aej11a</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=aej11a" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/marcoseoane"><img src="https://avatars0.githubusercontent.com/u/28088807?v=4" width="100px;" alt=""/><br /><sub><b>marcoseoane</b></sub></a><br /><a href="#ideas-marcoseoane" title="Ideas, Planning, & Feedback">🤔</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://github.com/rishabhpoddar"><img src="https://avatars2.githubusercontent.com/u/2976287?v=4" width="100px;" alt=""/><br /><sub><b>Rishabh Poddar</b></sub></a><br /><a href="#ideas-rishabhpoddar" title="Ideas, Planning, & Feedback">🤔</a></td>
|
||||
<td align="center"><a href="https://github.com/lorenzorapetti"><img src="https://avatars1.githubusercontent.com/u/2632174?v=4" width="100px;" alt=""/><br /><sub><b>Lorenzo Rapetti</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=lorenzorapetti" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/wKovacs64"><img src="https://avatars1.githubusercontent.com/u/1288694?v=4" width="100px;" alt=""/><br /><sub><b>Justin Hall</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=wKovacs64" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=wKovacs64" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="https://github.com/sijad"><img src="https://avatars3.githubusercontent.com/u/7693001?v=4" width="100px;" alt=""/><br /><sub><b>Sajjad Hashemian</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=sijad" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/ETLopes"><img src="https://avatars3.githubusercontent.com/u/34959471?v=4" width="100px;" alt=""/><br /><sub><b>Eduardo Lopes</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=ETLopes" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/mattleff"><img src="https://avatars0.githubusercontent.com/u/120155?v=4" width="100px;" alt=""/><br /><sub><b>Matthew Leffler</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=mattleff" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="https://hew.tools"><img src="https://avatars0.githubusercontent.com/u/3103241?v=4" width="100px;" alt=""/><br /><sub><b>Matt</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=hew" title="Documentation">📖</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://github.com/sonnypgs"><img src="https://avatars3.githubusercontent.com/u/1431300?v=4" width="100px;" alt=""/><br /><sub><b>Sonny</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=sonnypgs" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="https://github.com/Zeko369"><img src="https://avatars3.githubusercontent.com/u/3064377?v=4" width="100px;" alt=""/><br /><sub><b>Fran Zekan</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=Zeko369" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=Zeko369" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="http://twitter.com/JanBaykara"><img src="https://avatars2.githubusercontent.com/u/237556?v=4" width="100px;" alt=""/><br /><sub><b>Jan Baykara</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=janbaykara" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="https://mikeattara.com"><img src="https://avatars1.githubusercontent.com/u/31483629?v=4" width="100px;" alt=""/><br /><sub><b>Mike Perry Y Attara</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=mikeattara" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="https://devanthe.dev"><img src="https://avatars0.githubusercontent.com/u/354652?v=4" width="100px;" alt=""/><br /><sub><b>Devan</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=DevanB" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="https://github.com/jclancy93"><img src="https://avatars2.githubusercontent.com/u/7850202?v=4" width="100px;" alt=""/><br /><sub><b>Jack Clancy</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=jclancy93" title="Code">💻</a> <a href="#maintenance-jclancy93" title="Maintenance">🚧</a></td>
|
||||
<td align="center"><a href="https://github.com/ntgussoni"><img src="https://avatars0.githubusercontent.com/u/10161067?v=4" width="100px;" alt=""/><br /><sub><b>Nicolas Torres</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=ntgussoni" title="Tests">⚠️</a> <a href="https://github.com/blitz-js/blitz/commits?author=ntgussoni" title="Code">💻</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="http://simonknott.de"><img src="https://avatars1.githubusercontent.com/u/14912729?v=4" width="100px;" alt=""/><br /><sub><b>Simon Knott</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=skn0tt" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=skn0tt" title="Tests">⚠️</a> <a href="#maintenance-skn0tt" title="Maintenance">🚧</a></td>
|
||||
<td align="center"><a href="http://jagascript.com"><img src="https://avatars0.githubusercontent.com/u/4562878?v=4" width="100px;" alt=""/><br /><sub><b>Jaga Santagostino</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=kandros" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=kandros" title="Documentation">📖</a> <a href="#maintenance-kandros" title="Maintenance">🚧</a></td>
|
||||
<td align="center"><a href="http://www.joaoportela.com"><img src="https://avatars0.githubusercontent.com/u/1010018?v=4" width="100px;" alt=""/><br /><sub><b>João Portela</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=jportela" title="Code">💻</a></td>
|
||||
<td align="center"><a href="http://dajin.dev"><img src="https://avatars0.githubusercontent.com/u/7122182?v=4" width="100px;" alt=""/><br /><sub><b>Da-Jin Chu</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=dajinchu" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://shinyaigeek.dev/"><img src="https://avatars1.githubusercontent.com/u/42742053?v=4" width="100px;" alt=""/><br /><sub><b>Shinobu Hayashi</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=Shinyaigeek" title="Code">💻</a></td>
|
||||
<td align="center"><a href="http://karankiri.com"><img src="https://avatars2.githubusercontent.com/u/19989161?v=4" width="100px;" alt=""/><br /><sub><b>Karan Kiri</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=karankiri" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/fullmetalengineer"><img src="https://avatars2.githubusercontent.com/u/5294903?v=4" width="100px;" alt=""/><br /><sub><b>Alan Long</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=fullmetalengineer" title="Documentation">📖</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="http://codingsh.xyz"><img src="https://avatars2.githubusercontent.com/u/57037080?v=4" width="100px;" alt=""/><br /><sub><b>codingsh</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=developerfred" title="Code">💻</a></td>
|
||||
<td align="center"><a href="http://twitter.com/peaonunes"><img src="https://avatars0.githubusercontent.com/u/3356720?v=4" width="100px;" alt=""/><br /><sub><b>Rafael Nunes</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/pulls?q=is%3Apr+reviewed-by%3Apeaonunes" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/blitz-js/blitz/commits?author=peaonunes" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://simonpeterdebbarma.com"><img src="https://avatars3.githubusercontent.com/u/31207418?v=4" width="100px;" alt=""/><br /><sub><b>Simon Debbarma</b></sub></a><br /><a href="#design-0ww" title="Design">🎨</a> <a href="#maintenance-0ww" title="Maintenance">🚧</a> <a href="https://github.com/blitz-js/blitz/commits?author=0ww" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="https://github.com/0xflotus"><img src="https://avatars3.githubusercontent.com/u/26602940?v=4" width="100px;" alt=""/><br /><sub><b>0xflotus</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=0xflotus" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=0xflotus" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="https://dev.to/tmns"><img src="https://avatars3.githubusercontent.com/u/35785003?v=4" width="100px;" alt=""/><br /><sub><b>tmns</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=tmns" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=tmns" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="http://jruharris.com"><img src="https://avatars1.githubusercontent.com/u/8636691?v=4" width="100px;" alt=""/><br /><sub><b>Jru Harris</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=harris1717" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="https://twitter.com/ivandevp"><img src="https://avatars3.githubusercontent.com/u/9284690?v=4" width="100px;" alt=""/><br /><sub><b>Ivan Medina</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=ivandevp" title="Code">💻</a> <a href="#maintenance-ivandevp" title="Maintenance">🚧</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://www.dwightwatson.com"><img src="https://avatars3.githubusercontent.com/u/1100408?v=4" width="100px;" alt=""/><br /><sub><b>Dwight Watson</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=dwightwatson" title="Code">💻</a></td>
|
||||
<td align="center"><a href="http://is2ei.com/"><img src="https://avatars3.githubusercontent.com/u/3948353?v=4" width="100px;" alt=""/><br /><sub><b>Horie Issei</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=is2ei" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://twitter.com/lednhatkhanh"><img src="https://avatars2.githubusercontent.com/u/9303093?v=4" width="100px;" alt=""/><br /><sub><b>Nhat Khanh</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=lednhatkhanh" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://builtforfifty.com"><img src="https://avatars1.githubusercontent.com/u/19371989?v=4" width="100px;" alt=""/><br /><sub><b>Abu Uzayr</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=abuuzayr" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/nabi009"><img src="https://avatars0.githubusercontent.com/u/3170831?v=4" width="100px;" alt=""/><br /><sub><b>Nabiullah elham</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=nabi009" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://lachlanjc.com"><img src="https://avatars1.githubusercontent.com/u/5074763?v=4" width="100px;" alt=""/><br /><sub><b>Lachlan Campbell</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=lachlanjc" title="Code">💻</a></td>
|
||||
<td align="center"><a href="http://enzoferey.com"><img src="https://avatars1.githubusercontent.com/u/10673347?v=4" width="100px;" alt=""/><br /><sub><b>Enzo Ferey</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=enzoferey" title="Code">💻</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://github.com/pgrimaud"><img src="https://avatars1.githubusercontent.com/u/1866496?v=4" width="100px;" alt=""/><br /><sub><b>Pierre Grimaud</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=pgrimaud" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/jletey"><img src="https://avatars1.githubusercontent.com/u/62398724?v=4" width="100px;" alt=""/><br /><sub><b>John Letey</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=jletey" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://pixelmord.github.io"><img src="https://avatars2.githubusercontent.com/u/224168?v=4" width="100px;" alt=""/><br /><sub><b>Andreas Adam</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=pixelmord" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://kevo.dev"><img src="https://avatars3.githubusercontent.com/u/15717067?v=4" width="100px;" alt=""/><br /><sub><b>Kevin Tovar</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=kevotovar" title="Code">💻</a></td>
|
||||
<td align="center"><a href="http://anteprimorac.com.hr"><img src="https://avatars0.githubusercontent.com/u/972083?v=4" width="100px;" alt=""/><br /><sub><b>Ante Primorac</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=anteprimorac" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=anteprimorac" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="http://mykalmachon.dev"><img src="https://avatars1.githubusercontent.com/u/7844994?v=4" width="100px;" alt=""/><br /><sub><b>Mykal Machon</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=MykalMachon" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://jamiedavenport.dev"><img src="https://avatars2.githubusercontent.com/u/1329874?v=4" width="100px;" alt=""/><br /><sub><b>Jamie Davenport</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=jamiedavenport" title="Code">💻</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://cloudnweb.dev/"><img src="https://avatars0.githubusercontent.com/u/17050715?v=4" width="100px;" alt=""/><br /><sub><b>GaneshMani</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=ganeshmani" title="Code">💻</a></td>
|
||||
<td align="center"><a href="http://ramonmorcillo.com"><img src="https://avatars3.githubusercontent.com/u/31936665?v=4" width="100px;" alt=""/><br /><sub><b>reymon359</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=reymon359" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://www.linkedin.com/in/gregory-vasquez-96413b184/"><img src="https://avatars1.githubusercontent.com/u/36422346?v=4" width="100px;" alt=""/><br /><sub><b>gvasquez11</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=gvasquez11" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/josemiguelo"><img src="https://avatars1.githubusercontent.com/u/15330034?v=4" width="100px;" alt=""/><br /><sub><b> José Miguel Ochoa</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=josemiguelo" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/osirvent"><img src="https://avatars2.githubusercontent.com/u/5927133?v=4" width="100px;" alt=""/><br /><sub><b>Oscar Sirvent</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=osirvent" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/donni106"><img src="https://avatars0.githubusercontent.com/u/1942953?v=4" width="100px;" alt=""/><br /><sub><b>Daniel Molnar</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=donni106" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="https://github.com/exclipy"><img src="https://avatars1.githubusercontent.com/u/508799?v=4" width="100px;" alt=""/><br /><sub><b>Kevin Wu Won</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=exclipy" title="Documentation">📖</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://github.com/tehnuge"><img src="https://avatars1.githubusercontent.com/u/1928236?v=4" width="100px;" alt=""/><br /><sub><b>John Duong</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=tehnuge" title="Code">💻</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- markdownlint-enable -->
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
||||
|
||||
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
||||
|
||||
3
TUTORIAL.md
Normal file
3
TUTORIAL.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Tutorial
|
||||
|
||||
[The tutorial has been moved to Blitzjs.com](https://blitzjs.com/docs/tutorial)
|
||||
3
USER_GUIDE.md
Normal file
3
USER_GUIDE.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# User Guide
|
||||
|
||||
[Full documentation is now available at Blitzjs.com](https://blitzjs.com/docs/getting-started)
|
||||
3
__mocks__/fs.js
Normal file
3
__mocks__/fs.js
Normal file
@@ -0,0 +1,3 @@
|
||||
const {fs} = require('memfs')
|
||||
|
||||
module.exports = fs
|
||||
BIN
assets/Fauna_Logo_Blue.png
Normal file
BIN
assets/Fauna_Logo_Blue.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
4
examples/plain-js/.babelrc.js
Normal file
4
examples/plain-js/.babelrc.js
Normal file
@@ -0,0 +1,4 @@
|
||||
module.exports = {
|
||||
presets: ["next/babel"],
|
||||
plugins: [],
|
||||
}
|
||||
10
examples/plain-js/.eslintrc.js
Normal file
10
examples/plain-js/.eslintrc.js
Normal file
@@ -0,0 +1,10 @@
|
||||
module.exports = {
|
||||
extends: ["react-app", "plugin:jsx-a11y/recommended"],
|
||||
plugins: ["jsx-a11y"],
|
||||
rules: {
|
||||
"import/no-anonymous-default-export": "error",
|
||||
"import/no-webpack-loader-syntax": "off",
|
||||
"react/react-in-jsx-scope": "off", // React is always in scope with Blitz
|
||||
"jsx-a11y/anchor-is-valid": "off", //Doesn't play well with Blitz/Next <Link> usage
|
||||
},
|
||||
}
|
||||
55
examples/plain-js/.gitignore
vendored
Normal file
55
examples/plain-js/.gitignore
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
# dependencies
|
||||
node_modules
|
||||
.yarn/cache
|
||||
.yarn/unplugged
|
||||
.yarn/build-state.yml
|
||||
.pnp.*
|
||||
.npm
|
||||
web_modules/
|
||||
|
||||
# blitz
|
||||
/.blitz/
|
||||
/.next/
|
||||
*.sqlite
|
||||
.now
|
||||
.blitz-console-history
|
||||
blitz-log.log
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
|
||||
# local env files
|
||||
.env
|
||||
.envrc
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Testing
|
||||
coverage
|
||||
*.lcov
|
||||
.nyc_output
|
||||
lib-cov
|
||||
|
||||
# Caches
|
||||
*.tsbuildinfo
|
||||
.eslintcache
|
||||
.node_repl_history
|
||||
.yarn-integrity
|
||||
|
||||
# Serverless directories
|
||||
.serverless/
|
||||
|
||||
# Stores VSCode versions used for testing VSCode extensions
|
||||
.vscode-test
|
||||
1
examples/plain-js/.npmrc
Normal file
1
examples/plain-js/.npmrc
Normal file
@@ -0,0 +1 @@
|
||||
save-exact=true
|
||||
5
examples/plain-js/.prettierignore
Normal file
5
examples/plain-js/.prettierignore
Normal file
@@ -0,0 +1,5 @@
|
||||
.gitkeep
|
||||
.env
|
||||
*.ico
|
||||
*.lock
|
||||
|
||||
26
examples/plain-js/README.md
Normal file
26
examples/plain-js/README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# plain-js
|
||||
|
||||
## Getting Started
|
||||
|
||||
1. Add this code to db/schema.prisma:
|
||||
|
||||
```
|
||||
model Project {
|
||||
id Int @default(autoincrement()) @id
|
||||
name String
|
||||
}
|
||||
```
|
||||
|
||||
2. DB migrate
|
||||
|
||||
```
|
||||
blitz db migrate
|
||||
```
|
||||
|
||||
3. Start the dev server
|
||||
|
||||
```
|
||||
blitz start
|
||||
```
|
||||
|
||||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
||||
0
examples/plain-js/app/components/.keep
Normal file
0
examples/plain-js/app/components/.keep
Normal file
22
examples/plain-js/app/components/ErrorBoundary.js
Normal file
22
examples/plain-js/app/components/ErrorBoundary.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import React from "react"
|
||||
export default class ErrorBoundary extends React.Component {
|
||||
state = {
|
||||
hasError: false,
|
||||
error: null,
|
||||
}
|
||||
|
||||
static getDerivedStateFromError(error) {
|
||||
return {
|
||||
hasError: true,
|
||||
error,
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
if (this.state.hasError) {
|
||||
return this.props.fallback(this.state.error)
|
||||
}
|
||||
|
||||
return this.props.children
|
||||
}
|
||||
}
|
||||
0
examples/plain-js/app/layouts/.keep
Normal file
0
examples/plain-js/app/layouts/.keep
Normal file
3
examples/plain-js/app/pages/_app.js
Normal file
3
examples/plain-js/app/pages/_app.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export default function MyApp({ Component, pageProps }) {
|
||||
return <Component {...pageProps} />
|
||||
}
|
||||
29
examples/plain-js/app/pages/_document.js
Normal file
29
examples/plain-js/app/pages/_document.js
Normal file
@@ -0,0 +1,29 @@
|
||||
import {
|
||||
Document,
|
||||
Html,
|
||||
DocumentHead,
|
||||
Main,
|
||||
BlitzScript,
|
||||
/*DocumentContext*/
|
||||
} from "blitz"
|
||||
|
||||
class MyDocument extends Document {
|
||||
// Only uncomment if you need to customize this behaviour
|
||||
// static async getInitialProps(ctx: DocumentContext) {
|
||||
// const initialProps = await Document.getInitialProps(ctx)
|
||||
// return {...initialProps}
|
||||
// }
|
||||
render() {
|
||||
return (
|
||||
<Html lang="en">
|
||||
<DocumentHead />
|
||||
<body>
|
||||
<Main />
|
||||
<BlitzScript />
|
||||
</body>
|
||||
</Html>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default MyDocument
|
||||
205
examples/plain-js/app/pages/index.js
Normal file
205
examples/plain-js/app/pages/index.js
Normal file
@@ -0,0 +1,205 @@
|
||||
import { Head, Link } from "blitz"
|
||||
const modelSnippet = `model Project {
|
||||
id Int @default(autoincrement()) @id
|
||||
name String
|
||||
}`
|
||||
const migrateSnippet = `$ blitz db migrate
|
||||
$ blitz generate all project`
|
||||
|
||||
const Home = () => (
|
||||
<div className="container">
|
||||
<Head>
|
||||
<title>plain-js</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
|
||||
<main>
|
||||
<div className="logo">
|
||||
<img src="/logo.png" alt="blitz.js" />
|
||||
</div>
|
||||
<p>
|
||||
1. Add this code to <strong>db/schema.prisma</strong>:
|
||||
</p>
|
||||
<pre>
|
||||
<code>{modelSnippet}</code>
|
||||
</pre>
|
||||
<p>2. Run these commands in your terminal:</p>
|
||||
<pre>
|
||||
<code>{migrateSnippet}</code>
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
3. Go to{" "}
|
||||
<Link href="/projects">
|
||||
<a>/projects</a>
|
||||
</Link>
|
||||
</p>
|
||||
<div className="buttons">
|
||||
<a
|
||||
className="button"
|
||||
href="https://github.com/blitz-js/blitz/blob/master/USER_GUIDE.md?utm_source=blitz-new&utm_medium=app-template&utm_campaign=blitz-new"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Documentation
|
||||
</a>
|
||||
<a
|
||||
className="button-outline"
|
||||
href="https://github.com/blitz-js/blitz"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Github Repo
|
||||
</a>
|
||||
<a
|
||||
className="button-outline"
|
||||
href="https://slack.blitzjs.com"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Slack Community
|
||||
</a>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<a
|
||||
href="https://blitzjs.com?utm_source=blitz-new&utm_medium=app-template&utm_campaign=blitz-new"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Powered by Blitz.js
|
||||
</a>
|
||||
</footer>
|
||||
|
||||
<style jsx>{`
|
||||
.container {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
main {
|
||||
padding: 5rem 0;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
main p {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
footer {
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
border-top: 1px solid #eaeaea;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #45009d;
|
||||
}
|
||||
|
||||
footer a {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
footer a {
|
||||
color: #f4f4f4;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.logo {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.logo img {
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
grid-gap: 0.5rem;
|
||||
margin-top: 6rem;
|
||||
}
|
||||
|
||||
a.button {
|
||||
background-color: #6700eb;
|
||||
padding: 1rem 2rem;
|
||||
color: #f4f4f4;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
a.button:hover {
|
||||
background-color: #45009d;
|
||||
}
|
||||
|
||||
a.button-outline {
|
||||
border: 2px solid #6700eb;
|
||||
padding: 1rem 2rem;
|
||||
color: #6700eb;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
a.button-outline:hover {
|
||||
border-color: #45009d;
|
||||
color: #45009d;
|
||||
}
|
||||
|
||||
pre {
|
||||
background: #fafafa;
|
||||
border-radius: 5px;
|
||||
padding: 0.75rem;
|
||||
}
|
||||
code {
|
||||
font-size: 0.9rem;
|
||||
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
|
||||
Bitstream Vera Sans Mono, Courier New, monospace;
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
max-width: 800px;
|
||||
margin-top: 3rem;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.grid {
|
||||
width: 100%;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
`}</style>
|
||||
|
||||
<style jsx global>{`
|
||||
@import url("https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@300;700&display=swap");
|
||||
|
||||
html,
|
||||
body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-family: "Libre Franklin", -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu,
|
||||
Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
|
||||
}
|
||||
|
||||
* {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
`}</style>
|
||||
</div>
|
||||
)
|
||||
|
||||
export default Home
|
||||
@@ -0,0 +1,5 @@
|
||||
import db from "db"
|
||||
export default async function createProject(args) {
|
||||
const project = await db.project.create(args)
|
||||
return project
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import db from "db"
|
||||
export default async function deleteProject(args) {
|
||||
const project = await db.project.delete(args)
|
||||
return project
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import db from "db"
|
||||
export default async function updateProject(args) {
|
||||
// Don't allow updating ID
|
||||
delete args.data.id
|
||||
const project = await db.project.update(args)
|
||||
return project
|
||||
}
|
||||
64
examples/plain-js/app/projects/pages/projects/[id].js
Normal file
64
examples/plain-js/app/projects/pages/projects/[id].js
Normal file
@@ -0,0 +1,64 @@
|
||||
import { Suspense } from "react"
|
||||
import { Head, Link, useRouter, useQuery } from "blitz"
|
||||
import getProject from "app/projects/queries/getProject"
|
||||
import deleteProject from "app/projects/mutations/deleteProject"
|
||||
export const Project = () => {
|
||||
const router = useRouter()
|
||||
const id = parseInt(router?.query.id)
|
||||
const [project] = useQuery(getProject, {
|
||||
where: {
|
||||
id,
|
||||
},
|
||||
})
|
||||
return (
|
||||
<div>
|
||||
<h1>Project {project.id}</h1>
|
||||
<pre>{JSON.stringify(project)}</pre>
|
||||
|
||||
<Link href="/projects/[id]/edit" as={`/projects/${project.id}/edit`}>
|
||||
<a>Edit</a>
|
||||
</Link>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
onClick={async () => {
|
||||
if (window.confirm("This will be deleted")) {
|
||||
await deleteProject({
|
||||
where: {
|
||||
id: project.id,
|
||||
},
|
||||
})
|
||||
router.push("/projects")
|
||||
}
|
||||
}}
|
||||
>
|
||||
Delete
|
||||
</button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const ShowProjectPage = () => {
|
||||
return (
|
||||
<div>
|
||||
<Head>
|
||||
<title>Project</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
|
||||
<main>
|
||||
<p>
|
||||
<Link href="/projects">
|
||||
<a>Projects</a>
|
||||
</Link>
|
||||
</p>
|
||||
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<Project />
|
||||
</Suspense>
|
||||
</main>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default ShowProjectPage
|
||||
68
examples/plain-js/app/projects/pages/projects/[id]/edit.js
Normal file
68
examples/plain-js/app/projects/pages/projects/[id]/edit.js
Normal file
@@ -0,0 +1,68 @@
|
||||
import { Suspense } from "react"
|
||||
import { Head, Link, useRouter, useQuery } from "blitz"
|
||||
import getProject from "app/projects/queries/getProject"
|
||||
import updateProject from "app/projects/mutations/updateProject"
|
||||
export const EditProject = () => {
|
||||
const router = useRouter()
|
||||
const id = parseInt(router?.query.id)
|
||||
const [project] = useQuery(getProject, {
|
||||
where: {
|
||||
id,
|
||||
},
|
||||
})
|
||||
return (
|
||||
<div>
|
||||
<h1>Edit Project {project.id}</h1>
|
||||
<pre>{JSON.stringify(project)}</pre>
|
||||
|
||||
<form
|
||||
onSubmit={async (event) => {
|
||||
event.preventDefault()
|
||||
|
||||
try {
|
||||
const updated = await updateProject({
|
||||
where: {
|
||||
id: project.id,
|
||||
},
|
||||
data: {
|
||||
name: "MyNewName",
|
||||
},
|
||||
})
|
||||
alert("Success!" + JSON.stringify(updated))
|
||||
router.push("/projects/[id]", `/projects/${updated.id}`)
|
||||
} catch (error) {
|
||||
alert("Error creating project " + JSON.stringify(error, null, 2))
|
||||
}
|
||||
}}
|
||||
>
|
||||
<div>Put your form fields here. But for now, just click submit</div>
|
||||
<button>Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const EditProjectPage = () => {
|
||||
return (
|
||||
<div>
|
||||
<Head>
|
||||
<title>Edit Project</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
|
||||
<main>
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<EditProject />
|
||||
</Suspense>
|
||||
|
||||
<p>
|
||||
<Link href="/projects">
|
||||
<a>Projects</a>
|
||||
</Link>
|
||||
</p>
|
||||
</main>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default EditProjectPage
|
||||
45
examples/plain-js/app/projects/pages/projects/index.js
Normal file
45
examples/plain-js/app/projects/pages/projects/index.js
Normal file
@@ -0,0 +1,45 @@
|
||||
import { Suspense } from "react"
|
||||
import { Head, Link, useQuery } from "blitz"
|
||||
import getProjects from "app/projects/queries/getProjects"
|
||||
|
||||
export const ProjectsList = () => {
|
||||
const [projects] = useQuery(getProjects, {})
|
||||
return (
|
||||
<ul>
|
||||
{projects.map((project) => (
|
||||
<li key={project.id}>
|
||||
<Link href="/projects/[id]" as={`/projects/${project.id}`}>
|
||||
<a>{project.name}</a>
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
)
|
||||
}
|
||||
|
||||
const ProjectsPage = () => {
|
||||
return (
|
||||
<div>
|
||||
<Head>
|
||||
<title>Projects</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
|
||||
<main>
|
||||
<h1>Projects</h1>
|
||||
|
||||
<p>
|
||||
<Link href="/projects/new">
|
||||
<a>Create Project</a>
|
||||
</Link>
|
||||
</p>
|
||||
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<ProjectsList />
|
||||
</Suspense>
|
||||
</main>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default ProjectsPage
|
||||
47
examples/plain-js/app/projects/pages/projects/new.js
Normal file
47
examples/plain-js/app/projects/pages/projects/new.js
Normal file
@@ -0,0 +1,47 @@
|
||||
import { Head, Link, useRouter } from "blitz"
|
||||
import createProject from "app/projects/mutations/createProject"
|
||||
|
||||
const NewProjectPage = () => {
|
||||
const router = useRouter()
|
||||
return (
|
||||
<div>
|
||||
<Head>
|
||||
<title>New Project</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
|
||||
<main>
|
||||
<h1>Create New Project </h1>
|
||||
|
||||
<form
|
||||
onSubmit={async (event) => {
|
||||
event.preventDefault()
|
||||
|
||||
try {
|
||||
const project = await createProject({
|
||||
data: {
|
||||
name: "MyName",
|
||||
},
|
||||
})
|
||||
alert("Success!" + JSON.stringify(project))
|
||||
router.push("/projects/[id]", `/projects/${project.id}`)
|
||||
} catch (error) {
|
||||
alert("Error creating project " + JSON.stringify(error, null, 2))
|
||||
}
|
||||
}}
|
||||
>
|
||||
<div>Put your form fields here. But for now, just click submit</div>
|
||||
<button>Submit</button>
|
||||
</form>
|
||||
|
||||
<p>
|
||||
<Link href="/projects">
|
||||
<a>Projects</a>
|
||||
</Link>
|
||||
</p>
|
||||
</main>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default NewProjectPage
|
||||
5
examples/plain-js/app/projects/queries/getProject.js
Normal file
5
examples/plain-js/app/projects/queries/getProject.js
Normal file
@@ -0,0 +1,5 @@
|
||||
import db from "db"
|
||||
export default async function getProject(args) {
|
||||
const project = await db.project.findOne(args)
|
||||
return project
|
||||
}
|
||||
5
examples/plain-js/app/projects/queries/getProjects.js
Normal file
5
examples/plain-js/app/projects/queries/getProjects.js
Normal file
@@ -0,0 +1,5 @@
|
||||
import db from "db"
|
||||
export default async function getProjects(args) {
|
||||
const projects = await db.project.findMany(args)
|
||||
return projects
|
||||
}
|
||||
13
examples/plain-js/blitz.config.js
Normal file
13
examples/plain-js/blitz.config.js
Normal file
@@ -0,0 +1,13 @@
|
||||
module.exports = {
|
||||
webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {
|
||||
// Note: we provide webpack above so you should not `require` it
|
||||
// Perform customizations to webpack config
|
||||
// Important: return the modified config
|
||||
return config
|
||||
},
|
||||
webpackDevMiddleware: (config) => {
|
||||
// Perform customizations to webpack dev middleware config
|
||||
// Important: return the modified config
|
||||
return config
|
||||
},
|
||||
}
|
||||
15
examples/plain-js/db/index.js
Normal file
15
examples/plain-js/db/index.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import { PrismaClient } from "@prisma/client"
|
||||
export * from "@prisma/client"
|
||||
|
||||
let prisma
|
||||
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
prisma = new PrismaClient()
|
||||
} else {
|
||||
// Ensure the prisma instance is re-used during hot-reloading
|
||||
// Otherwise, a new client will be created on every reload
|
||||
global.prisma = global.prisma || new PrismaClient()
|
||||
prisma = global.prisma
|
||||
}
|
||||
|
||||
export default prisma
|
||||
0
examples/plain-js/db/migrations/.keep
Normal file
0
examples/plain-js/db/migrations/.keep
Normal file
58
examples/plain-js/db/migrations/20200514183443/README.md
Normal file
58
examples/plain-js/db/migrations/20200514183443/README.md
Normal file
@@ -0,0 +1,58 @@
|
||||
# Migration `20200514183443`
|
||||
|
||||
This migration has been generated by Brandon Bayer at 5/14/2020, 6:34:43 PM.
|
||||
You can check out the [state of the schema](./schema.prisma) after the migration.
|
||||
|
||||
## Database Steps
|
||||
|
||||
```sql
|
||||
PRAGMA foreign_keys=OFF;
|
||||
|
||||
CREATE TABLE "quaint"."Project" (
|
||||
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
"name" TEXT NOT NULL
|
||||
)
|
||||
|
||||
PRAGMA "quaint".foreign_key_check;
|
||||
|
||||
PRAGMA foreign_keys=ON;
|
||||
```
|
||||
|
||||
## Changes
|
||||
|
||||
```diff
|
||||
diff --git schema.prisma schema.prisma
|
||||
migration ..20200514183443
|
||||
--- datamodel.dml
|
||||
+++ datamodel.dml
|
||||
@@ -1,0 +1,27 @@
|
||||
+// This is your Prisma schema file,
|
||||
+// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
||||
+
|
||||
+datasource sqlite {
|
||||
+ provider = "sqlite"
|
||||
+ url = "file:./db.sqlite"
|
||||
+}
|
||||
+
|
||||
+// SQLite is easy to start with, but if you use Postgres in production
|
||||
+// you should also use it in development with the following:
|
||||
+//datasource postgresql {
|
||||
+// provider = "postgresql"
|
||||
+// url = env("DATABASE_URL")
|
||||
+//}
|
||||
+
|
||||
+generator client {
|
||||
+ provider = "prisma-client-js"
|
||||
+}
|
||||
+
|
||||
+
|
||||
+// --------------------------------------
|
||||
+
|
||||
+model Project {
|
||||
+ id Int @default(autoincrement()) @id
|
||||
+ name String
|
||||
+}
|
||||
+
|
||||
```
|
||||
|
||||
|
||||
27
examples/plain-js/db/migrations/20200514183443/schema.prisma
Normal file
27
examples/plain-js/db/migrations/20200514183443/schema.prisma
Normal file
@@ -0,0 +1,27 @@
|
||||
// This is your Prisma schema file,
|
||||
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
||||
|
||||
datasource sqlite {
|
||||
provider = "sqlite"
|
||||
url = "***"
|
||||
}
|
||||
|
||||
// SQLite is easy to start with, but if you use Postgres in production
|
||||
// you should also use it in development with the following:
|
||||
//datasource postgresql {
|
||||
// provider = "postgresql"
|
||||
// url = "***"
|
||||
//}
|
||||
|
||||
generator client {
|
||||
provider = "prisma-client-js"
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------
|
||||
|
||||
model Project {
|
||||
id Int @default(autoincrement()) @id
|
||||
name String
|
||||
}
|
||||
|
||||
81
examples/plain-js/db/migrations/20200514183443/steps.json
Normal file
81
examples/plain-js/db/migrations/20200514183443/steps.json
Normal file
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"version": "0.3.14-fixed",
|
||||
"steps": [
|
||||
{
|
||||
"tag": "CreateSource",
|
||||
"source": "sqlite"
|
||||
},
|
||||
{
|
||||
"tag": "CreateArgument",
|
||||
"location": {
|
||||
"tag": "Source",
|
||||
"source": "sqlite"
|
||||
},
|
||||
"argument": "provider",
|
||||
"value": "\"sqlite\""
|
||||
},
|
||||
{
|
||||
"tag": "CreateArgument",
|
||||
"location": {
|
||||
"tag": "Source",
|
||||
"source": "sqlite"
|
||||
},
|
||||
"argument": "url",
|
||||
"value": "\"file:./db.sqlite\""
|
||||
},
|
||||
{
|
||||
"tag": "CreateModel",
|
||||
"model": "Project"
|
||||
},
|
||||
{
|
||||
"tag": "CreateField",
|
||||
"model": "Project",
|
||||
"field": "id",
|
||||
"type": "Int",
|
||||
"arity": "Required"
|
||||
},
|
||||
{
|
||||
"tag": "CreateDirective",
|
||||
"location": {
|
||||
"path": {
|
||||
"tag": "Field",
|
||||
"model": "Project",
|
||||
"field": "id"
|
||||
},
|
||||
"directive": "default"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tag": "CreateArgument",
|
||||
"location": {
|
||||
"tag": "Directive",
|
||||
"path": {
|
||||
"tag": "Field",
|
||||
"model": "Project",
|
||||
"field": "id"
|
||||
},
|
||||
"directive": "default"
|
||||
},
|
||||
"argument": "",
|
||||
"value": "autoincrement()"
|
||||
},
|
||||
{
|
||||
"tag": "CreateDirective",
|
||||
"location": {
|
||||
"path": {
|
||||
"tag": "Field",
|
||||
"model": "Project",
|
||||
"field": "id"
|
||||
},
|
||||
"directive": "id"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tag": "CreateField",
|
||||
"model": "Project",
|
||||
"field": "name",
|
||||
"type": "String",
|
||||
"arity": "Required"
|
||||
}
|
||||
]
|
||||
}
|
||||
6
examples/plain-js/db/migrations/migrate.lock
Normal file
6
examples/plain-js/db/migrations/migrate.lock
Normal file
@@ -0,0 +1,6 @@
|
||||
# IF THERE'S A GIT CONFLICT IN THIS FILE, DON'T SOLVE IT MANUALLY!
|
||||
# INSTEAD EXECUTE `prisma migrate fix`
|
||||
# Prisma Migrate lockfile v1
|
||||
# Read more about conflict resolution here: TODO
|
||||
|
||||
20200514183443
|
||||
27
examples/plain-js/db/schema.prisma
Normal file
27
examples/plain-js/db/schema.prisma
Normal file
@@ -0,0 +1,27 @@
|
||||
// This is your Prisma schema file,
|
||||
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
||||
|
||||
datasource sqlite {
|
||||
provider = "sqlite"
|
||||
url = "file:./db.sqlite"
|
||||
}
|
||||
|
||||
// SQLite is easy to start with, but if you use Postgres in production
|
||||
// you should also use it in development with the following:
|
||||
//datasource postgresql {
|
||||
// provider = "postgresql"
|
||||
// url = env("DATABASE_URL")
|
||||
//}
|
||||
|
||||
generator client {
|
||||
provider = "prisma-client-js"
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------
|
||||
|
||||
model Project {
|
||||
id Int @default(autoincrement()) @id
|
||||
name String
|
||||
}
|
||||
|
||||
0
examples/plain-js/integrations/.keep
Normal file
0
examples/plain-js/integrations/.keep
Normal file
0
examples/plain-js/jobs/.keep
Normal file
0
examples/plain-js/jobs/.keep
Normal file
5
examples/plain-js/jsconfig.json
Normal file
5
examples/plain-js/jsconfig.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": "."
|
||||
}
|
||||
}
|
||||
55
examples/plain-js/package.json
Normal file
55
examples/plain-js/package.json
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"name": "plain-js",
|
||||
"version": "0.14.0",
|
||||
"scripts": {
|
||||
"start": "blitz start",
|
||||
"build": "blitz db migrate && blitz build",
|
||||
"lint": "eslint --ignore-path .gitignore --ext .js,.ts,.tsx .",
|
||||
"test": "echo \"DISABLED\""
|
||||
},
|
||||
"browserslist": [
|
||||
"defaults"
|
||||
],
|
||||
"prettier": {
|
||||
"semi": false,
|
||||
"printWidth": 110
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged && pretty-quick --staged",
|
||||
"pre-push": "blitz test"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{js,ts,tsx}": [
|
||||
"eslint --fix",
|
||||
"git add"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@prisma/cli": "2.0.0",
|
||||
"@prisma/client": "2.0.0",
|
||||
"blitz": "0.14.0",
|
||||
"react": "0.0.0-experimental-33c3af284",
|
||||
"react-dom": "0.0.0-experimental-33c3af284"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "16.9.35",
|
||||
"@typescript-eslint/eslint-plugin": "2.31.0",
|
||||
"@typescript-eslint/parser": "2.31.0",
|
||||
"babel-eslint": "10.1.0",
|
||||
"eslint": "6.8.0",
|
||||
"eslint-config-react-app": "5.2.1",
|
||||
"eslint-plugin-flowtype": "4.7.0",
|
||||
"eslint-plugin-import": "2.20.2",
|
||||
"eslint-plugin-jsx-a11y": "6.2.3",
|
||||
"eslint-plugin-react": "7.20.0",
|
||||
"eslint-plugin-react-hooks": "3.0.0",
|
||||
"husky": "4.2.5",
|
||||
"lint-staged": "10.2.2",
|
||||
"prettier": "2.0.5",
|
||||
"pretty-quick": "2.0.1",
|
||||
"typescript": "3.9.2"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
BIN
examples/plain-js/public/favicon.ico
Executable file
BIN
examples/plain-js/public/favicon.ico
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 556 B |
BIN
examples/plain-js/public/logo.png
Normal file
BIN
examples/plain-js/public/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
0
examples/plain-js/utils/.keep
Normal file
0
examples/plain-js/utils/.keep
Normal file
8634
examples/plain-js/yarn.lock
Normal file
8634
examples/plain-js/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
4
examples/store/.babelrc.js
Normal file
4
examples/store/.babelrc.js
Normal file
@@ -0,0 +1,4 @@
|
||||
module.exports = {
|
||||
presets: ['next/babel'],
|
||||
plugins: [],
|
||||
}
|
||||
1
examples/store/.env.example
Normal file
1
examples/store/.env.example
Normal file
@@ -0,0 +1 @@
|
||||
DATABASE_URL=postgresql://USERNAME@localhost:5432/blitz-example-store
|
||||
14
examples/store/.eslintrc.js
Normal file
14
examples/store/.eslintrc.js
Normal file
@@ -0,0 +1,14 @@
|
||||
module.exports = {
|
||||
extends: ["react-app", "plugin:jsx-a11y/recommended"],
|
||||
plugins: ["jsx-a11y", "cypress"],
|
||||
rules: {
|
||||
"import/no-anonymous-default-export": "error",
|
||||
"import/no-webpack-loader-syntax": "off",
|
||||
"react/react-in-jsx-scope": "off", // React is always in scope with Blitz
|
||||
"jsx-a11y/anchor-is-valid": "off", //Doesn't play well with Blitz/Next <Link> usage
|
||||
"jsx-a11y/label-has-associated-control": "off",
|
||||
},
|
||||
env: {
|
||||
"cypress/globals": true,
|
||||
},
|
||||
}
|
||||
39
examples/store/.gitignore
vendored
Normal file
39
examples/store/.gitignore
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
cypress/videos
|
||||
cypress/screenshots
|
||||
|
||||
# next.js
|
||||
/.next/
|
||||
/out/
|
||||
/.blitz/
|
||||
*.sqlite
|
||||
.generated-prisma-client
|
||||
.blitz-console-history
|
||||
|
||||
# production
|
||||
/build
|
||||
.now
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# local env files
|
||||
.envrc
|
||||
.env
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
5
examples/store/.prettierignore
Normal file
5
examples/store/.prettierignore
Normal file
@@ -0,0 +1,5 @@
|
||||
.gitkeep
|
||||
.env
|
||||
*.ico
|
||||
*.lock
|
||||
|
||||
15
examples/store/README.md
Normal file
15
examples/store/README.md
Normal file
@@ -0,0 +1,15 @@
|
||||
## Getting Started
|
||||
|
||||
1. DB migrate
|
||||
|
||||
```
|
||||
yarn blitz db migrate
|
||||
```
|
||||
|
||||
2. Start the dev server
|
||||
|
||||
```
|
||||
yarn blitz start
|
||||
```
|
||||
|
||||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
||||
18
examples/store/app/admin/pages/admin/index.tsx
Normal file
18
examples/store/app/admin/pages/admin/index.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Link } from "blitz"
|
||||
|
||||
function StoreAdminPage() {
|
||||
return (
|
||||
<div>
|
||||
<h1>Store Admin</h1>
|
||||
<div>
|
||||
<p>
|
||||
<Link href="/admin/products">
|
||||
<a>Manage Products</a>
|
||||
</Link>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default StoreAdminPage
|
||||
40
examples/store/app/admin/pages/admin/products/[id].tsx
Normal file
40
examples/store/app/admin/pages/admin/products/[id].tsx
Normal file
@@ -0,0 +1,40 @@
|
||||
import { Suspense } from "react"
|
||||
import { Link, useRouter, useQuery, useParam } from "blitz"
|
||||
import getProduct from "app/products/queries/getProduct"
|
||||
import ProductForm from "app/products/components/ProductForm"
|
||||
|
||||
function Product() {
|
||||
const router = useRouter()
|
||||
const id = useParam("id", "number")
|
||||
const [product, { mutate }] = useQuery(getProduct, { where: { id } })
|
||||
|
||||
return (
|
||||
<ProductForm
|
||||
product={product}
|
||||
onSuccess={(updatedProduct) => {
|
||||
mutate(updatedProduct)
|
||||
router.push("/admin/products")
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
function EditProductPage() {
|
||||
return (
|
||||
<div>
|
||||
<h1>Edit Product</h1>
|
||||
<p>
|
||||
<Link href="/admin/products">
|
||||
<a>Manage Products</a>
|
||||
</Link>
|
||||
</p>
|
||||
<div>
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<Product />
|
||||
</Suspense>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default EditProductPage
|
||||
49
examples/store/app/admin/pages/admin/products/index.tsx
Normal file
49
examples/store/app/admin/pages/admin/products/index.tsx
Normal file
@@ -0,0 +1,49 @@
|
||||
import { Suspense } from "react"
|
||||
import { useQuery, Link, useRouterQuery } from "blitz"
|
||||
import getProducts from "app/products/queries/getProducts"
|
||||
import getProduct from "app/products/queries/getProduct"
|
||||
|
||||
function ProductsList() {
|
||||
const { orderby = "id", order = "desc" } = useRouterQuery()
|
||||
|
||||
const [products] = useQuery(getProducts, {
|
||||
orderBy: {
|
||||
[Array.isArray(orderby) ? orderby[0] : orderby]: order,
|
||||
},
|
||||
})
|
||||
|
||||
return (
|
||||
<ul>
|
||||
{products.map((product) => (
|
||||
<li key={product.id}>
|
||||
<Link href="/admin/products/[id]" as={`/admin/products/${product.id}`}>
|
||||
<a onMouseEnter={() => getProduct({ where: { id: product.id } })}>{product.name}</a>
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
)
|
||||
}
|
||||
|
||||
function AdminProducts() {
|
||||
return (
|
||||
<div>
|
||||
<h1>Products</h1>
|
||||
|
||||
<p>
|
||||
<Link href="/admin/products/new">
|
||||
<a>Create Product</a>
|
||||
</Link>
|
||||
<Link href="/admin">
|
||||
<a style={{ marginLeft: 16 }}>Admin</a>
|
||||
</Link>
|
||||
</p>
|
||||
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<ProductsList />
|
||||
</Suspense>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default AdminProducts
|
||||
21
examples/store/app/admin/pages/admin/products/new.tsx
Normal file
21
examples/store/app/admin/pages/admin/products/new.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Link, useRouter } from "blitz"
|
||||
import ProductForm from "app/products/components/ProductForm"
|
||||
|
||||
function AdminNewProductPage() {
|
||||
const router = useRouter()
|
||||
return (
|
||||
<div>
|
||||
<h1>Create a New Product</h1>
|
||||
<p>
|
||||
<Link href="/admin/products">
|
||||
<a>Manage Products</a>
|
||||
</Link>
|
||||
</p>
|
||||
<div>
|
||||
<ProductForm onSuccess={() => router.push("/admin/products")} />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default AdminNewProductPage
|
||||
0
examples/store/app/components/.keep
Normal file
0
examples/store/app/components/.keep
Normal file
21
examples/store/app/components/ErrorBoundary.tsx
Normal file
21
examples/store/app/components/ErrorBoundary.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import React from "react"
|
||||
|
||||
export default class ErrorBoundary extends React.Component<{
|
||||
fallback: (error: any) => React.ReactNode
|
||||
}> {
|
||||
state = { hasError: false, error: null }
|
||||
|
||||
static getDerivedStateFromError(error: any) {
|
||||
return {
|
||||
hasError: true,
|
||||
error,
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
if (this.state.hasError) {
|
||||
return this.props.fallback(this.state.error)
|
||||
}
|
||||
return this.props.children
|
||||
}
|
||||
}
|
||||
0
examples/store/app/layouts/.keep
Normal file
0
examples/store/app/layouts/.keep
Normal file
3
examples/store/app/pages/_app.tsx
Normal file
3
examples/store/app/pages/_app.tsx
Normal file
@@ -0,0 +1,3 @@
|
||||
export default function MyApp({ Component, pageProps }) {
|
||||
return <Component {...pageProps} />
|
||||
}
|
||||
22
examples/store/app/pages/_document.tsx
Normal file
22
examples/store/app/pages/_document.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import { Document, Html, DocumentHead, Main, BlitzScript, DocumentContext } from "@blitzjs/core"
|
||||
|
||||
class MyDocument extends Document {
|
||||
static async getInitialProps(ctx: DocumentContext) {
|
||||
const initialProps = await Document.getInitialProps(ctx)
|
||||
return { ...initialProps }
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Html lang="en">
|
||||
<DocumentHead />
|
||||
<body>
|
||||
<Main />
|
||||
<BlitzScript />
|
||||
</body>
|
||||
</Html>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default MyDocument
|
||||
195
examples/store/app/pages/index.tsx
Normal file
195
examples/store/app/pages/index.tsx
Normal file
@@ -0,0 +1,195 @@
|
||||
import { Head, Link } from "blitz"
|
||||
|
||||
const Home = () => (
|
||||
<div className="container">
|
||||
<Head>
|
||||
<title>Blitz Example Store</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
|
||||
<main>
|
||||
<h1 className="title" style={{ marginBottom: 24 }}>
|
||||
Blitz Store Example
|
||||
</h1>
|
||||
<ul>
|
||||
<li>
|
||||
<Link href="/products">
|
||||
<a>Static Product Listings</a>
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/products/ssr">
|
||||
<a>SSR Product Listings</a>
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/products/paginated">
|
||||
<a>Paginated Product Listings (client-rendered)</a>
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/products/infinite">
|
||||
<a>Infinite Product Listings (client-rendered)</a>
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/admin/products">
|
||||
<a>Admin Section (client-rendered)</a>
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<a
|
||||
href="https://blitzjs.com?utm_source=blitz-new&utm_medium=app-template&utm_campaign=blitz-new"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Powered by Blitz.js
|
||||
</a>
|
||||
</footer>
|
||||
|
||||
<style jsx>{`
|
||||
.container {
|
||||
min-height: 100vh;
|
||||
padding: 0 0.5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
main {
|
||||
padding: 5rem 0;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
footer {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
border-top: 1px solid #eaeaea;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
footer img {
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
|
||||
footer a {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0070f3;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
li + li {
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
.title a:hover,
|
||||
.title a:focus,
|
||||
.title a:active {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.title {
|
||||
margin: 0;
|
||||
line-height: 1.15;
|
||||
font-size: 3rem;
|
||||
}
|
||||
|
||||
.title,
|
||||
.description {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.description {
|
||||
line-height: 1.5;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
code {
|
||||
background: #fafafa;
|
||||
border-radius: 5px;
|
||||
padding: 0.75rem;
|
||||
font-size: 1.1rem;
|
||||
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
|
||||
Bitstream Vera Sans Mono, Courier New, monospace;
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
max-width: 800px;
|
||||
margin-top: 3rem;
|
||||
}
|
||||
|
||||
.card {
|
||||
margin: 1rem;
|
||||
flex-basis: 45%;
|
||||
padding: 1.5rem;
|
||||
text-align: left;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
border: 1px solid #eaeaea;
|
||||
border-radius: 10px;
|
||||
transition: color 0.15s ease, border-color 0.15s ease;
|
||||
}
|
||||
|
||||
.card:hover,
|
||||
.card:focus,
|
||||
.card:active {
|
||||
color: #0070f3;
|
||||
border-color: #0070f3;
|
||||
}
|
||||
|
||||
.card h3 {
|
||||
margin: 0 0 1rem 0;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.card p {
|
||||
margin: 0;
|
||||
font-size: 1.25rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.grid {
|
||||
width: 100%;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
`}</style>
|
||||
|
||||
<style jsx global>{`
|
||||
html,
|
||||
body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell,
|
||||
Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
`}</style>
|
||||
</div>
|
||||
)
|
||||
|
||||
export default Home
|
||||
80
examples/store/app/products/components/ProductForm.tsx
Normal file
80
examples/store/app/products/components/ProductForm.tsx
Normal file
@@ -0,0 +1,80 @@
|
||||
import { Form, Field } from "react-final-form"
|
||||
import { Product, ProductCreateInput, ProductUpdateInput } from "db"
|
||||
import createProduct from "../mutations/createProduct"
|
||||
import updateProduct from "../mutations/updateProduct"
|
||||
|
||||
type ProductInput = ProductCreateInput | ProductUpdateInput
|
||||
|
||||
function isNew(product: ProductInput): product is ProductCreateInput {
|
||||
return (product as ProductUpdateInput).id === undefined
|
||||
}
|
||||
|
||||
type ProductFormProps = {
|
||||
product?: ProductUpdateInput
|
||||
style?: React.CSSProperties
|
||||
onSuccess: (product: Product) => any
|
||||
}
|
||||
|
||||
function ProductForm({ product, style, onSuccess, ...props }: ProductFormProps) {
|
||||
return (
|
||||
<Form
|
||||
initialValues={product || { name: null, handle: null, description: null, price: null }}
|
||||
onSubmit={async (data: ProductInput) => {
|
||||
if (isNew(data)) {
|
||||
try {
|
||||
const product = await createProduct({ data })
|
||||
onSuccess(product)
|
||||
} catch (error) {
|
||||
alert("Error creating product " + JSON.stringify(error, null, 2))
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
const product = await updateProduct({ where: { id: data.id }, data })
|
||||
onSuccess(product)
|
||||
} catch (error) {
|
||||
alert("Error updating product " + JSON.stringify(error, null, 2))
|
||||
}
|
||||
}
|
||||
}}
|
||||
render={({ handleSubmit }) => (
|
||||
<form onSubmit={handleSubmit} style={{ maxWidth: 400, ...style }} {...props}>
|
||||
<div style={{ marginBottom: 16 }}>
|
||||
<label style={{ display: "flex", flexDirection: "column" }}>
|
||||
Product Name
|
||||
<Field name="name" component="input" />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div style={{ marginBottom: 16 }}>
|
||||
<label style={{ display: "flex", flexDirection: "column" }}>
|
||||
Handle
|
||||
<Field name="handle" component="input" />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div style={{ marginBottom: 16 }}>
|
||||
<label style={{ display: "flex", flexDirection: "column" }}>
|
||||
Description
|
||||
<Field name="description" component="textarea" />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div style={{ marginBottom: 16 }}>
|
||||
<label style={{ display: "flex", flexDirection: "column" }}>
|
||||
Price
|
||||
<Field
|
||||
name="price"
|
||||
component="input"
|
||||
parse={(value) => (value ? parseInt(value) : null)}
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<button>{product ? "Update" : "Create"} Product</button>
|
||||
</form>
|
||||
)}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
export default ProductForm
|
||||
10
examples/store/app/products/mutations/createProduct.ts
Normal file
10
examples/store/app/products/mutations/createProduct.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import db, { ProductCreateArgs } from "db"
|
||||
|
||||
type CreateProductInput = {
|
||||
data: ProductCreateArgs["data"]
|
||||
}
|
||||
export default async function createProduct({ data }: CreateProductInput) {
|
||||
const product = await db.product.create({ data })
|
||||
|
||||
return product
|
||||
}
|
||||
11
examples/store/app/products/mutations/deleteProduct.ts
Normal file
11
examples/store/app/products/mutations/deleteProduct.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import db, { ProductDeleteArgs } from "db"
|
||||
|
||||
type DeleteProductInput = {
|
||||
where: ProductDeleteArgs["where"]
|
||||
}
|
||||
|
||||
export default async function deleteProduct({ where }: DeleteProductInput) {
|
||||
const product = await db.product.delete({ where })
|
||||
|
||||
return product
|
||||
}
|
||||
15
examples/store/app/products/mutations/updateProduct.ts
Normal file
15
examples/store/app/products/mutations/updateProduct.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import db, { ProductUpdateArgs } from "db"
|
||||
|
||||
type UpdateProductInput = {
|
||||
where: ProductUpdateArgs["where"]
|
||||
data: ProductUpdateArgs["data"]
|
||||
}
|
||||
|
||||
export default async function updateProduct({ where, data }: UpdateProductInput) {
|
||||
// Don't allow updating
|
||||
delete data.id
|
||||
|
||||
const product = await db.product.update({ where, data })
|
||||
|
||||
return product
|
||||
}
|
||||
46
examples/store/app/products/pages/products/[handle].tsx
Normal file
46
examples/store/app/products/pages/products/[handle].tsx
Normal file
@@ -0,0 +1,46 @@
|
||||
import { Link, BlitzPage, GetStaticProps, GetStaticPaths } from "blitz"
|
||||
import getProduct from "app/products/queries/getProduct"
|
||||
import getProducts from "app/products/queries/getProducts"
|
||||
import { Product } from "db"
|
||||
|
||||
type StaticProps = {
|
||||
product: Product
|
||||
}
|
||||
|
||||
export const getStaticProps: GetStaticProps<StaticProps> = async (ctx) => {
|
||||
const product = await getProduct({ where: { handle: ctx.params.handle as string } })
|
||||
|
||||
return {
|
||||
props: { product },
|
||||
// Unstable beacuse revalidate is still under RFC: https://nextjs.link/issg
|
||||
unstable_revalidate: 1,
|
||||
}
|
||||
}
|
||||
export const getStaticPaths: GetStaticPaths = async () => {
|
||||
const paths = (await getProducts({ orderBy: { id: "desc" } })).map(({ handle }) => ({
|
||||
params: { handle },
|
||||
}))
|
||||
return {
|
||||
paths,
|
||||
fallback: true,
|
||||
}
|
||||
}
|
||||
|
||||
const Page: BlitzPage<StaticProps> = function ({ product }) {
|
||||
if (!product) {
|
||||
return <div>Building Page...</div>
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h1>{product.name}</h1>
|
||||
<p>{product.description}</p>
|
||||
<p>Price: ${product.price}</p>
|
||||
|
||||
<Link href="/products">
|
||||
<a>All Products</a>
|
||||
</Link>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default Page
|
||||
35
examples/store/app/products/pages/products/index.tsx
Normal file
35
examples/store/app/products/pages/products/index.tsx
Normal file
@@ -0,0 +1,35 @@
|
||||
import { Link, BlitzPage, GetStaticProps } from "blitz"
|
||||
import getProducts from "../../queries/getProducts"
|
||||
import { Product } from "db"
|
||||
|
||||
type StaticProps = {
|
||||
products: Product[]
|
||||
}
|
||||
|
||||
export const getStaticProps: GetStaticProps<StaticProps> = async () => {
|
||||
const products = await getProducts({ orderBy: { id: "desc" } })
|
||||
|
||||
return {
|
||||
props: { products },
|
||||
// Unstable because revalidate is still under RFC: https://nextjs.link/issg
|
||||
unstable_revalidate: 1,
|
||||
}
|
||||
}
|
||||
|
||||
const Page: BlitzPage<StaticProps> = function ({ products }) {
|
||||
return (
|
||||
<div>
|
||||
<h1>Products</h1>
|
||||
<div id="products">
|
||||
{products.map((product) => (
|
||||
<p key={product.id}>
|
||||
<Link href="/products/[handle]" as={`/products/${product.handle}`}>
|
||||
<a>{product.name}</a>
|
||||
</Link>
|
||||
</p>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default Page
|
||||
44
examples/store/app/products/pages/products/infinite.tsx
Normal file
44
examples/store/app/products/pages/products/infinite.tsx
Normal file
@@ -0,0 +1,44 @@
|
||||
import { Suspense, Fragment } from "react"
|
||||
import { BlitzPage, useInfiniteQuery } from "blitz"
|
||||
import getProductsInfinite from "app/products/queries/getProductsInfinite"
|
||||
|
||||
const Products = () => {
|
||||
const [
|
||||
groupedProducts,
|
||||
{ isFetching, isFetchingMore, fetchMore, canFetchMore },
|
||||
] = useInfiniteQuery(getProductsInfinite, (page = { take: 3, skip: 0 }) => page, {
|
||||
getFetchMore: (lastGroup) => lastGroup.nextPage,
|
||||
})
|
||||
|
||||
return (
|
||||
<>
|
||||
{groupedProducts.map((group, i) => (
|
||||
<Fragment key={i}>
|
||||
{group.products.map((product) => (
|
||||
<p key={product.id}>{product.name}</p>
|
||||
))}
|
||||
</Fragment>
|
||||
))}
|
||||
|
||||
<div>
|
||||
<button onClick={() => fetchMore()} disabled={!canFetchMore || isFetchingMore}>
|
||||
{isFetchingMore ? "Loading more..." : canFetchMore ? "Load More" : "Nothing more to load"}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div>{isFetching && !isFetchingMore ? "Fetching..." : null}</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
const Page: BlitzPage = function () {
|
||||
return (
|
||||
<div>
|
||||
<h1>Products - Infinite</h1>
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<Products />
|
||||
</Suspense>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default Page
|
||||
43
examples/store/app/products/pages/products/paginated.tsx
Normal file
43
examples/store/app/products/pages/products/paginated.tsx
Normal file
@@ -0,0 +1,43 @@
|
||||
import { Suspense, useState } from "react"
|
||||
import { Link, BlitzPage, usePaginatedQuery } from "blitz"
|
||||
import getProducts from "app/products/queries/getProducts"
|
||||
|
||||
const ITEMS_PER_PAGE = 3
|
||||
|
||||
const Products = () => {
|
||||
const [page, setPage] = useState(0)
|
||||
const [products] = usePaginatedQuery(getProducts, {
|
||||
skip: ITEMS_PER_PAGE * page,
|
||||
take: ITEMS_PER_PAGE,
|
||||
})
|
||||
|
||||
return (
|
||||
<div>
|
||||
{products.map((product) => (
|
||||
<p key={product.id}>
|
||||
<Link href="/products/[handle]" as={`/products/${product.handle}`}>
|
||||
<a>{product.name}</a>
|
||||
</Link>
|
||||
</p>
|
||||
))}
|
||||
<button disabled={page === 0} onClick={() => setPage(page - 1)}>
|
||||
Previous
|
||||
</button>
|
||||
<button disabled={products.length !== ITEMS_PER_PAGE} onClick={() => setPage(page + 1)}>
|
||||
Next
|
||||
</button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const Page: BlitzPage = function () {
|
||||
return (
|
||||
<div>
|
||||
<h1>Products - Paginated</h1>
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<Products />
|
||||
</Suspense>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default Page
|
||||
33
examples/store/app/products/pages/products/ssr.tsx
Normal file
33
examples/store/app/products/pages/products/ssr.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import { Link, BlitzPage, GetServerSideProps, ssrQuery } from "@blitzjs/core"
|
||||
import getProducts from "app/products/queries/getProducts"
|
||||
import { Product } from "db"
|
||||
|
||||
type PageProps = {
|
||||
products: Product[]
|
||||
}
|
||||
|
||||
export const getServerSideProps: GetServerSideProps<PageProps> = async ({ req, res }) => {
|
||||
const products = await ssrQuery(getProducts, { orderBy: { id: "desc" } }, { req, res })
|
||||
|
||||
return {
|
||||
props: { products },
|
||||
}
|
||||
}
|
||||
|
||||
const Page: BlitzPage<PageProps> = function ({ products }) {
|
||||
return (
|
||||
<div>
|
||||
<h1>Products</h1>
|
||||
<div id="products">
|
||||
{products.map((product) => (
|
||||
<p key={product.id}>
|
||||
<Link href="/products/[handle]" as={`/products/${product.handle}`}>
|
||||
<a>{product.name}</a>
|
||||
</Link>
|
||||
</p>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default Page
|
||||
13
examples/store/app/products/queries/getProduct.ts
Normal file
13
examples/store/app/products/queries/getProduct.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import db, { FindOneProductArgs } from "db"
|
||||
|
||||
type GetProductInput = {
|
||||
where: FindOneProductArgs["where"]
|
||||
// Only available if a model relationship exists
|
||||
// include?: FindOneProductArgs['include']
|
||||
}
|
||||
|
||||
export default async function getProduct({ where }: GetProductInput) {
|
||||
const product = await db.product.findOne({ where })
|
||||
|
||||
return product
|
||||
}
|
||||
29
examples/store/app/products/queries/getProducts.ts
Normal file
29
examples/store/app/products/queries/getProducts.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import db, { FindManyProductArgs } from "db"
|
||||
|
||||
type GetProductsInput = {
|
||||
where?: FindManyProductArgs["where"]
|
||||
orderBy?: FindManyProductArgs["orderBy"]
|
||||
skip?: FindManyProductArgs["skip"]
|
||||
cursor?: FindManyProductArgs["cursor"]
|
||||
take?: FindManyProductArgs["take"]
|
||||
// Only available if a model relationship exists
|
||||
// include?: FindManyProductArgs['include']
|
||||
}
|
||||
|
||||
export default async function getProducts({
|
||||
where,
|
||||
orderBy,
|
||||
skip,
|
||||
cursor,
|
||||
take,
|
||||
}: GetProductsInput) {
|
||||
const products = await db.product.findMany({
|
||||
where,
|
||||
orderBy,
|
||||
skip,
|
||||
cursor,
|
||||
take,
|
||||
})
|
||||
|
||||
return products
|
||||
}
|
||||
29
examples/store/app/products/queries/getProductsInfinite.ts
Normal file
29
examples/store/app/products/queries/getProductsInfinite.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import db, { FindManyProductArgs } from "db"
|
||||
|
||||
type GetProductsInput = {
|
||||
where?: FindManyProductArgs["where"]
|
||||
orderBy?: FindManyProductArgs["orderBy"]
|
||||
skip?: FindManyProductArgs["skip"]
|
||||
cursor?: FindManyProductArgs["cursor"]
|
||||
take?: FindManyProductArgs["take"]
|
||||
// Only available if a model relationship exists
|
||||
// include?: FindManyProductArgs['include']
|
||||
}
|
||||
|
||||
export default async function getProducts({ where, orderBy, take, skip }: GetProductsInput) {
|
||||
const products = await db.product.findMany({
|
||||
where,
|
||||
orderBy,
|
||||
take,
|
||||
skip,
|
||||
})
|
||||
|
||||
const count = await db.product.count()
|
||||
const hasMore = skip + take < count
|
||||
const nextPage = hasMore ? { take, skip: skip + take } : null
|
||||
|
||||
return {
|
||||
products,
|
||||
nextPage,
|
||||
}
|
||||
}
|
||||
13
examples/store/blitz.config.js
Normal file
13
examples/store/blitz.config.js
Normal file
@@ -0,0 +1,13 @@
|
||||
module.exports = {
|
||||
webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {
|
||||
// Note: we provide webpack above so you should not `require` it
|
||||
// Perform customizations to webpack config
|
||||
// Important: return the modified config
|
||||
return config
|
||||
},
|
||||
webpackDevMiddleware: (config) => {
|
||||
// Perform customizations to webpack dev middleware config
|
||||
// Important: return the modified config
|
||||
return config
|
||||
},
|
||||
}
|
||||
5
examples/store/cypress.json
Normal file
5
examples/store/cypress.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"baseUrl": "http://localhost:3099",
|
||||
"defaultCommandTimeout": 10000,
|
||||
"video": false
|
||||
}
|
||||
5
examples/store/cypress/fixtures/example.json
Normal file
5
examples/store/cypress/fixtures/example.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "Using fixtures to represent data",
|
||||
"email": "hello@cypress.io",
|
||||
"body": "Fixtures are a great way to mock data for responses to routes"
|
||||
}
|
||||
17
examples/store/cypress/integration/admin/index.test.ts
Normal file
17
examples/store/cypress/integration/admin/index.test.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
describe("admin#index page", () => {
|
||||
beforeEach(() => {
|
||||
cy.visit("/admin")
|
||||
})
|
||||
|
||||
it("Has H1", () => {
|
||||
cy.visit("/admin")
|
||||
cy.contains("h1", "Store Admin")
|
||||
})
|
||||
|
||||
it("goes to admin/products page", () => {
|
||||
cy.contains("a", "Manage Products").click()
|
||||
cy.location("pathname").should("equal", "/admin/products")
|
||||
})
|
||||
})
|
||||
|
||||
export {}
|
||||
@@ -0,0 +1,50 @@
|
||||
import { insert, data, fields } from "./helper"
|
||||
|
||||
describe("admin/products/[handle] page", () => {
|
||||
beforeEach(() => {
|
||||
insert()
|
||||
|
||||
cy.visit("/admin/products")
|
||||
cy.get("ul > li:last-child a").click()
|
||||
})
|
||||
|
||||
it("Has h1 and link back", () => {
|
||||
cy.contains("h1", "Edit Product")
|
||||
cy.get("p > a").first().contains("Manage Products").click()
|
||||
cy.location("pathname").should("equal", "/admin/products")
|
||||
})
|
||||
|
||||
it("Has all fields, change ProductName", () => {
|
||||
cy.get("form > div > label").as("inputs")
|
||||
cy.get("@inputs").should("have.length", 4)
|
||||
|
||||
const random = Math.round(Math.random() * 100000).toString()
|
||||
|
||||
const count = {}
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const { label, type } = fields[i]
|
||||
const [element, inputType] = type.split("|")
|
||||
let item = data[i]
|
||||
|
||||
if (count[element] === undefined) count[element] = 0
|
||||
if (inputType) {
|
||||
cy.get("@inputs").get(element).eq(count[element]).should("have.attr", "type", inputType)
|
||||
}
|
||||
|
||||
item += random
|
||||
|
||||
cy.get("@inputs").eq(i).contains(label)
|
||||
cy.get("@inputs").get(element).eq(count[element]).clear().type(item)
|
||||
cy.get("@inputs").get(element).eq(count[element]).should("have.value", item)
|
||||
|
||||
count[element]++
|
||||
}
|
||||
|
||||
cy.get("button").click()
|
||||
|
||||
cy.location("pathname").should("equal", "/admin/products")
|
||||
cy.get("ul > li:last-child").contains(data[0] + random)
|
||||
})
|
||||
})
|
||||
|
||||
export {}
|
||||
45
examples/store/cypress/integration/admin/products/helper.ts
Normal file
45
examples/store/cypress/integration/admin/products/helper.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
export const fields = [
|
||||
{ label: "Product Name", type: "input|", uniq: true },
|
||||
{ label: "Handle", type: "input|", uniq: true },
|
||||
{ label: "Description", type: "textarea|" },
|
||||
{ label: "Price", type: "input|" }, // TODO: Add input type here input|number
|
||||
]
|
||||
export const data = ["Apples", "apples", "Fresh apples", "32"]
|
||||
|
||||
export const insert = (): string => {
|
||||
cy.visit("/admin/products/new")
|
||||
cy.get("form > div > label").as("inputs")
|
||||
cy.get("@inputs").should("have.length", 4)
|
||||
|
||||
const random = Math.round(Math.random() * 100000).toString()
|
||||
const name = data[0] + random
|
||||
|
||||
const count = {}
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const { label, type, uniq } = fields[i]
|
||||
const [element, inputType] = type.split("|")
|
||||
let item = data[i]
|
||||
|
||||
if (count[element] === undefined) count[element] = 0
|
||||
if (inputType) {
|
||||
cy.get("@inputs").get(element).eq(count[element]).should("have.attr", "type", inputType)
|
||||
}
|
||||
|
||||
if (uniq) {
|
||||
item += random
|
||||
}
|
||||
|
||||
cy.get("@inputs").eq(i).contains(label)
|
||||
cy.get("@inputs").eq(i).type(item)
|
||||
cy.get("@inputs").get(element).eq(count[element]).should("have.value", item)
|
||||
|
||||
count[element]++
|
||||
}
|
||||
|
||||
cy.get("button").click()
|
||||
|
||||
cy.location("pathname").should("equal", "/admin/products")
|
||||
cy.get("ul > li:first-child").contains(name)
|
||||
|
||||
return name
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
import { insert } from "./helper"
|
||||
|
||||
describe("admin/products page", () => {
|
||||
beforeEach(() => {
|
||||
cy.visit("/admin/products")
|
||||
})
|
||||
|
||||
it("Has H1", () => {
|
||||
cy.contains("h1", "Products")
|
||||
})
|
||||
|
||||
it("goes to new product page", () => {
|
||||
cy.get("p > a").first().contains("Create Product").click()
|
||||
cy.location("pathname").should("equal", "/admin/products/new")
|
||||
})
|
||||
|
||||
it("goes to bas product page", () => {
|
||||
cy.get("p > a").last().contains("Admin").click()
|
||||
cy.location("pathname").should("equal", "/admin")
|
||||
})
|
||||
|
||||
it("shows ascending order", () => {
|
||||
cy.get("ul > li")
|
||||
.first()
|
||||
.then(($li) => {
|
||||
const title = $li.find("> a").text()
|
||||
|
||||
cy.visit("/admin/products?order=asc")
|
||||
cy.get("ul > li").last().contains("a", title)
|
||||
})
|
||||
})
|
||||
|
||||
// This is kind of redundant because this logic is handled in insert()
|
||||
it("shows latest created product", () => {
|
||||
const name = insert()
|
||||
cy.get("ul > li").contains(name)
|
||||
})
|
||||
})
|
||||
|
||||
export {}
|
||||
@@ -0,0 +1,19 @@
|
||||
import { insert } from "./helper"
|
||||
|
||||
describe("admin/products/new page", () => {
|
||||
beforeEach(() => {
|
||||
cy.visit("/admin/products/new")
|
||||
})
|
||||
|
||||
it("Has h1 and link back", () => {
|
||||
cy.contains("h1", "Create a New Product")
|
||||
cy.get("p > a").first().contains("Manage Products").click()
|
||||
cy.location("pathname").should("equal", "/admin/products")
|
||||
})
|
||||
|
||||
it("Fills fields and creates product", () => {
|
||||
insert()
|
||||
})
|
||||
})
|
||||
|
||||
export {}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user