Skip to content

Commit c4fa3d4

Browse files
committed
Initial commit
0 parents  commit c4fa3d4

File tree

158 files changed

+19408
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+19408
-0
lines changed

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 2
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.node*.js
2+
node_modules
3+
tests/*.js

.eslintrc.js

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
module.exports = {
2+
"env": {
3+
"node": true,
4+
"commonjs": true,
5+
"es2021": true
6+
},
7+
"globals": {
8+
"test": "true",
9+
"expect": "true"
10+
},
11+
"extends": "eslint:recommended",
12+
"parserOptions": {
13+
"ecmaVersion": 2021,
14+
"sourceType": "module",
15+
"ecmaFeatures": {
16+
"jsx": true
17+
}
18+
},
19+
"rules": {
20+
"react/jsx-uses-react": "error",
21+
"react/jsx-uses-vars": "error"
22+
},
23+
"plugins": ["react"],
24+
"overrides": [
25+
{
26+
"files": ["**/functions/**/*.{js,jsx}", "**/edge-src/**/*.{js,jsx}"],
27+
"env": {
28+
"node": false,
29+
"worker": true,
30+
},
31+
"globals": {
32+
"HTMLRewriter": "readonly"
33+
},
34+
},
35+
{
36+
"files": ["**/client-src/**/*.{js,jsx}"],
37+
"env": {
38+
"node": false,
39+
"worker": false,
40+
"browser": true,
41+
},
42+
},
43+
{
44+
"files": ["**/common-src/**/*.{js,jsx}"],
45+
"env": {
46+
"node": true,
47+
"worker": true,
48+
"browser": true,
49+
},
50+
},
51+
]
52+
};

.github/workflows/deploy.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Deploy to Cloudflare Pages
2+
3+
on:
4+
# push:
5+
# branches: ["dev-v1"]
6+
7+
# Allows you to run this workflow manually from the Actions tab
8+
workflow_dispatch:
9+
inputs:
10+
DEPLOYMENT_ENVIRONMENT:
11+
description: 'Deployment environment'
12+
required: true
13+
type: choice
14+
options:
15+
- preview
16+
- production
17+
default: 'production'
18+
19+
env:
20+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
21+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
22+
CLOUDFLARE_PROJECT_NAME: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
23+
R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
24+
R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
25+
R2_PUBLIC_BUCKET: ${{ secrets.R2_PUBLIC_BUCKET || secrets.CLOUDFLARE_PROJECT_NAME }}
26+
DEPLOYMENT_ENVIRONMENT: ${{ inputs.DEPLOYMENT_ENVIRONMENT }}
27+
PRODUCTION_BRANCH: main
28+
jobs:
29+
deploy:
30+
runs-on: ubuntu-latest
31+
environment:
32+
name: ${{ github.event.inputs.DEPLOYMENT_ENVIRONMENT }}
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v3
36+
- name: Setup
37+
uses: borales/[email protected]
38+
with:
39+
cmd: setup:production
40+
- name: Deploy to Cloudflare Pages [${{ inputs.DEPLOYMENT_ENVIRONMENT }}]
41+
uses: borales/[email protected]
42+
with:
43+
cmd: deploy:github

.gitignore

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
*.lcov
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (https://nodejs.org/api/addons.html)
38+
build/Release
39+
40+
# Dependency directories
41+
node_modules/
42+
jspm_packages/
43+
44+
# TypeScript v1 declaration files
45+
typings/
46+
47+
# TypeScript cache
48+
*.tsbuildinfo
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Microbundle cache
57+
.rpt2_cache/
58+
.rts2_cache_cjs/
59+
.rts2_cache_es/
60+
.rts2_cache_umd/
61+
62+
# Optional REPL history
63+
.node_repl_history
64+
65+
# Output of 'npm pack'
66+
*.tgz
67+
68+
# Yarn Integrity file
69+
.yarn-integrity
70+
71+
# dotenv environment variables file
72+
.env
73+
.env.test
74+
75+
# parcel-bundler cache (https://parceljs.org/)
76+
.cache
77+
78+
# Next.js build output
79+
.next
80+
81+
# Nuxt.js build / generate output
82+
.nuxt
83+
dist
84+
85+
# Gatsby files
86+
.cache/
87+
# Comment in the public line in if your project uses Gatsby and *not* Next.js
88+
# https://nextjs.org/blog/next-9-1#public-directory-support
89+
# public
90+
91+
# vuepress build output
92+
.vuepress/dist
93+
94+
# Serverless directories
95+
.serverless/
96+
97+
# FuseBox cache
98+
.fusebox/
99+
100+
# DynamoDB Local files
101+
.dynamodb/
102+
103+
# TernJS port file
104+
.tern-port
105+
106+
build/
107+
webpack-stats.json
108+
.idea
109+
*.vars
110+
.wrangler/
111+
.vars.toml
112+
*.cjs
113+
*.mjs
114+
.yarn/

.swcrc

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"jsc": {
3+
"parser": {
4+
"syntax": "ecmascript",
5+
"jsx": true,
6+
"dynamicImport": true
7+
},
8+
"target": "es5"
9+
}
10+
}

0 commit comments

Comments
 (0)