Skip to content

Commit fc1be19

Browse files
committed
Add more starter files
1 parent a05da34 commit fc1be19

Some content is hidden

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

49 files changed

+5168
-123
lines changed

.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
version: 2
3+
updates:
4+
- package-ecosystem: 'npm'
5+
directory: '/'
6+
schedule:
7+
interval: 'weekly'
8+
day: 'monday'

.github/workflows/deploy.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# Sample workflow for building and deploying a Next.js site to GitHub Pages
2+
#
3+
# To get started with Next.js see: https://nextjs.org/docs/getting-started
4+
#
5+
name: Deploy Next.js site to Pages
6+
7+
on:
8+
# Runs on pushes targeting the default branch
9+
push:
10+
branches: ["main"]
11+
12+
# Allows you to run this workflow manually from the Actions tab
13+
workflow_dispatch:
14+
15+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
16+
permissions:
17+
contents: read
18+
pages: write
19+
id-token: write
20+
21+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
22+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
23+
concurrency:
24+
group: "pages"
25+
cancel-in-progress: false
26+
27+
jobs:
28+
# Build job
29+
build:
30+
runs-on: ubuntu-latest
31+
steps:
32+
# Build documentation pages
33+
- uses: actions/checkout@v4
34+
- name: Set up Python ${{ matrix.python-version }}
35+
uses: actions/setup-python@v4
36+
with:
37+
python-version: ${{ matrix.python-version }}
38+
- name: Generate the pygame-ce documentation
39+
run: |
40+
python -m pip install --upgrade pip
41+
pip install sphinx==7.1.2
42+
git clone https://github.com/pygame-community/pygame-ce.git
43+
cd pygame-ce
44+
python setup.py docs
45+
cd ../
46+
python utils/generate_docs.py
47+
48+
- name: Checkout
49+
uses: actions/checkout@v4
50+
51+
- name: Detect package manager
52+
id: detect-package-manager
53+
run: |
54+
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
55+
echo "manager=yarn" >> $GITHUB_OUTPUT
56+
echo "command=install" >> $GITHUB_OUTPUT
57+
echo "runner=yarn" >> $GITHUB_OUTPUT
58+
exit 0
59+
elif [ -f "${{ github.workspace }}/package.json" ]; then
60+
echo "manager=npm" >> $GITHUB_OUTPUT
61+
echo "command=ci" >> $GITHUB_OUTPUT
62+
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
63+
exit 0
64+
else
65+
echo "Unable to determine package manager"
66+
exit 1
67+
fi
68+
69+
- name: Setup Node
70+
uses: actions/setup-node@v4
71+
with:
72+
node-version: "lts/*"
73+
cache: ${{ steps.detect-package-manager.outputs.manager }}
74+
75+
- name: Setup Pages
76+
uses: actions/configure-pages@v4
77+
78+
- name: Restore cache
79+
uses: actions/cache@v4
80+
with:
81+
path: |
82+
.next/cache
83+
# Generate a new cache whenever packages or source files change.
84+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
85+
# If source files changed but packages didn't, rebuild from a prior cache.
86+
restore-keys: |
87+
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
88+
89+
- name: Install dependencies
90+
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
91+
92+
- name: Build with Next.js
93+
run: ${{ steps.detect-package-manager.outputs.runner }} next build
94+
95+
- name: Upload artifact
96+
uses: actions/upload-pages-artifact@v3
97+
with:
98+
path: ./out
99+
100+
# Deployment job
101+
deploy:
102+
environment:
103+
name: github-pages
104+
url: ${{ steps.deployment.outputs.page_url }}
105+
runs-on: ubuntu-latest
106+
needs: build
107+
steps:
108+
- name: Deploy to GitHub Pages
109+
id: deployment
110+
uses: actions/deploy-pages@v4

.github/workflows/format.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Code Formatting Check
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
prettier:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check out repo
12+
uses: actions/checkout@v2
13+
- uses: actions/cache@v2
14+
name: Configure npm caching
15+
with:
16+
path: ~/.npm
17+
key: ${{ runner.os }}-npm-${{ hashFiles('**/workflows/prettier.yml') }}
18+
restore-keys: |
19+
${{ runner.os }}-npm-
20+
- name: Run prettier
21+
run: |-
22+
npx prettier --check .
23+
black:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v2
27+
- uses: psf/black@stable
28+
with:
29+
options: '--check --verbose'
30+
src: '.'

.gitignore

Lines changed: 26 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -1,130 +1,36 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
lerna-debug.log*
8-
.pnpm-debug.log*
9-
10-
# Diagnostic reports (https://nodejs.org/api/report.html)
11-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
122

13-
# Runtime data
14-
pids
15-
*.pid
16-
*.seed
17-
*.pid.lock
18-
19-
# Directory for instrumented libs generated by jscoverage/JSCover
20-
lib-cov
21-
22-
# Coverage directory used by tools like istanbul
23-
coverage
24-
*.lcov
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
.yarn/install-state.gz
258

26-
# nyc test coverage
27-
.nyc_output
9+
# testing
10+
/coverage
2811

29-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30-
.grunt
12+
# next.js
13+
/.next/
14+
/out/
3115

32-
# Bower dependency directory (https://bower.io/)
33-
bower_components
16+
# production
17+
/build
3418

35-
# node-waf configuration
36-
.lock-wscript
19+
# misc
20+
.DS_Store
21+
*.pem
3722

38-
# Compiled binary addons (https://nodejs.org/api/addons.html)
39-
build/Release
23+
# debug
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
4027

41-
# Dependency directories
42-
node_modules/
43-
jspm_packages/
28+
# local env files
29+
.env*.local
4430

45-
# Snowpack dependency directory (https://snowpack.dev/)
46-
web_modules/
31+
# vercel
32+
.vercel
4733

48-
# TypeScript cache
34+
# typescript
4935
*.tsbuildinfo
50-
51-
# Optional npm cache directory
52-
.npm
53-
54-
# Optional eslint cache
55-
.eslintcache
56-
57-
# Optional stylelint cache
58-
.stylelintcache
59-
60-
# Microbundle cache
61-
.rpt2_cache/
62-
.rts2_cache_cjs/
63-
.rts2_cache_es/
64-
.rts2_cache_umd/
65-
66-
# Optional REPL history
67-
.node_repl_history
68-
69-
# Output of 'npm pack'
70-
*.tgz
71-
72-
# Yarn Integrity file
73-
.yarn-integrity
74-
75-
# dotenv environment variable files
76-
.env
77-
.env.development.local
78-
.env.test.local
79-
.env.production.local
80-
.env.local
81-
82-
# parcel-bundler cache (https://parceljs.org/)
83-
.cache
84-
.parcel-cache
85-
86-
# Next.js build output
87-
.next
88-
out
89-
90-
# Nuxt.js build / generate output
91-
.nuxt
92-
dist
93-
94-
# Gatsby files
95-
.cache/
96-
# Comment in the public line in if your project uses Gatsby and not Next.js
97-
# https://nextjs.org/blog/next-9-1#public-directory-support
98-
# public
99-
100-
# vuepress build output
101-
.vuepress/dist
102-
103-
# vuepress v2.x temp and cache directory
104-
.temp
105-
.cache
106-
107-
# Docusaurus cache and generated files
108-
.docusaurus
109-
110-
# Serverless directories
111-
.serverless/
112-
113-
# FuseBox cache
114-
.fusebox/
115-
116-
# DynamoDB Local files
117-
.dynamodb/
118-
119-
# TernJS port file
120-
.tern-port
121-
122-
# Stores VSCode versions used for testing VSCode extensions
123-
.vscode-test
124-
125-
# yarn v2
126-
.yarn/cache
127-
.yarn/unplugged
128-
.yarn/build-state.yml
129-
.yarn/install-state.gz
130-
.pnp.*
36+
next-env.d.ts

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

LICENSE

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
MIT License
2-
3-
Copyright (c) 2023 Pygame Community
1+
The MIT License (MIT)
42

53
Permission is hereby granted, free of charge, to any person obtaining a copy
64
of this software and associated documentation files (the "Software"), to deal

next.config.mjs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/** @type {import('next').NextConfig} */
2+
const nextConfig = {
3+
/**
4+
* Enable static exports for the App Router.
5+
*
6+
* @see https://nextjs.org/docs/app/building-your-application/deploying/static-exports
7+
*/
8+
output: "export",
9+
10+
/**
11+
* Disable server-based image optimization. Next.js does not support
12+
* dynamic features with static exports.
13+
*
14+
* @see https://nextjs.org/docs/pages/api-reference/components/image#unoptimized
15+
*/
16+
images: {
17+
unoptimized: true,
18+
},
19+
20+
// async rewrites() {
21+
// return [
22+
// {
23+
// source: "/ce/docs",
24+
// destination: "/ce/docs/index.html",
25+
// locale: false,
26+
// },
27+
// ];
28+
// },
29+
};
30+
31+
export default nextConfig;

package.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "pygame.community",
3+
"version": "0.1.0",
4+
"private": true,
5+
"packageManager": "[email protected]",
6+
"scripts": {
7+
"dev": "next dev",
8+
"build": "next build",
9+
"start": "next start",
10+
"lint": "next lint"
11+
},
12+
"dependencies": {
13+
"next": "14.1.0",
14+
"react": "^18",
15+
"react-dom": "^18"
16+
},
17+
"devDependencies": {
18+
"@types/node": "^20",
19+
"@types/react": "^18",
20+
"@types/react-dom": "^18",
21+
"autoprefixer": "^10.0.1",
22+
"eslint": "^8",
23+
"eslint-config-next": "14.1.0",
24+
"postcss": "^8",
25+
"tailwindcss": "^3.3.0",
26+
"typescript": "^5"
27+
}
28+
}

postcss.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
6+
};

0 commit comments

Comments
 (0)