Skip to content

Commit

Permalink
feat: init
Browse files Browse the repository at this point in the history
  • Loading branch information
ax-sh committed Mar 12, 2024
1 parent e7fb28a commit ad34009
Show file tree
Hide file tree
Showing 41 changed files with 10,092 additions and 0 deletions.
1 change: 1 addition & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "extends": ["@commitlint/config-conventional"] }
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = tab
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.yml]
indent_style = space
indent_size = 2
58 changes: 58 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Simple workflow for deploying static content to GitHub Pages
name: CI Deploy
#name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: 8.14.3
- name: Set up Node
uses: actions/setup-node@v4
with:
# node-version: 18
node-version-file: ".nvmrc"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Build
run: pnpm run build
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload dist repository
path: "./dist"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
.idea
.env
.vite
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm commitlint --edit ${1}
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm lint-staged
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
auto-install-peers=true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20
34 changes: 34 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# directories
node_modules/
dist/
build/
coverage/
.pnpm-store/

# logs
*.log
*-debug.log*
*-error.log*

# miscellaneous
.eslintcache
.DS_Store
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
.vercel
*.tsbuildinfo

# secrets
.env
.env.*
.env-*
.npmrc

# locks
*-lock.json
*-lock.yaml
*.lock
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"trailingComma": "es5",
"useTabs": true,
"semi": true,
"singleQuote": false,
"printWidth": 120,
"bracketSpacing": true
}
50 changes: 50 additions & 0 deletions .release-it.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
module.exports = {
git: {
commitMessage: "ci: release v${version}",
tag: true,
commit: true,
changelog:
"npx auto-changelog --stdout --commit-limit false -u --template https://raw.githubusercontent.com/release-it/release-it/main/templates/changelog-compact.hbs",
},
github: {
release: true,
releaseNotes:
'git log --no-merges --pretty=format:"* %s %h" ${latestTag}...master',
comments: {
submit: true,
issue:
":rocket: _This issue has been resolved in v${version}. See [${releaseName}](${releaseUrl}) for release notes._",
pr: ":rocket: _This pull request is included in v${version}. See [${releaseName}](${releaseUrl}) for release notes._",
},
},
plugins: {
"@release-it/conventional-changelog": {
preset: {
name: "conventionalcommits",
},
infile: "CHANGELOG.md",
},
},
hooks: {
"before:init": [
"git fetch --tags -f",
"git fetch --prune --prune-tags origin",
"pnpm test",
"git update-index -q --refresh",
],
"before:beforeBump": [
"git flow release start v${version}",
"pnpm pretty-quick",
'git commit --allow-empty -am "chore: prettify before release"',
"echo \uD83D\uDC4A before:bump version=v${version} latestVersion=v${latestVersion}",
],
"after:release": [
"git flow release finish --notag",
"echo \uD83D\uDE4C Successfully released ${name} v${version} to ${repo.repository}.",
"git push origin HEAD",
"git push origin refs/heads/master:master",
"echo Successfully released ${name} v${version} to ${repo.repository}.",
],
"after:git:release": "gh pr create --fill -B master",
},
};
33 changes: 33 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"compile-hero.disable-compile-files-on-did-save-code": false,
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/node_modules": true,
"node_modules": true,
"**/build": true,
"build": true,
"src/setupTests.ts": true,
"setupTests.ts": true,
"src/reportWebVitals.ts": true,
"src/react-app-env.d.ts": true,
"README.md": true,
".gitignore": true,
"coverage": true
},
"explorerExclude.backup": null,
"cSpell.words": [
"commitlint",
"craco",
"Newari",
"numiterations",
"predeploy",
"uglifyjs",
"windi",
"windicss",
"zopfli"
]
}
39 changes: 39 additions & 0 deletions .xo-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"extends": ["xo", "xo-react", "prettier"],
"plugins": ["prettier"],
"rules": {
"prettier/prettier": ["error"],
"capitalized-comments": "off",
"react/react-in-jsx-scope": "off",
"object-curly-spacing": "off",
"@typescript-eslint/triple-slash-reference": "off",
"import/extensions": "off",
"n/file-extension-in-import": "off",
"unicorn/prefer-module": "off",
"new-cap": ["warn"],
"react/no-unescaped-entities": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/prefer-ts-expect-error": "off",
"react/jsx-pascal-case": "off",

"unicorn/filename-case": [
"warn",
{
"case": "kebabCase"
}
]
},
"overrides": [
{
"files": ["**/constants/*.ts"],
"rule": { "@typescript-eslint/naming-convention": "off" }
},
{
"files": ["*.config.js", "*.config.ts"],
"rule": {
"@typescript-eslint/ban-ts-comment": "off",
"new-cap": "off"
}
}
]
}
Loading

0 comments on commit ad34009

Please sign in to comment.