This repository has been archived by the owner on Sep 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: starter for Vite react-ts (#1)
* chore: put configurations * feat: starter for vite react-ts
- Loading branch information
Showing
14 changed files
with
2,612 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": ["@commitlint/config-conventional"], | ||
"rules": { | ||
"type-enum": [2, "always", ["chore", "feat", "fix"]] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Logs | ||
logs | ||
*.log | ||
pnpm-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
# Plugins | ||
.history |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
pnpm commitlint --edit $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
pnpm lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules/ | ||
dist/ | ||
pnpm-lock.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true, | ||
"printWidth": 80, | ||
"tabWidth": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# @tenzyu/ks | ||
|
||
A Kick-Starter for TypeScript Projects. | ||
|
||
## 🚧 This package is still under construction. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env zx | ||
|
||
import '../dist/index.js' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { build } from 'esbuild' | ||
|
||
//////////////////////////////////////////////////////////////// | ||
|
||
const flags = new Set(process.argv.filter((arg) => arg.startsWith('--'))) | ||
const isProd = process.env['APP_ENV'] === 'prod' | ||
|
||
// https://esbuild.github.io/api/ | ||
const options = { | ||
legalComments: 'eof', | ||
drop: isProd ? ['console', 'debugger'] : [], | ||
minify: flags.has('--minify') || isProd, | ||
color: true, | ||
logLevel: 'warning', | ||
|
||
/* Build Options */ | ||
bundle: true, | ||
outfile: './dist/index.js', | ||
entryPoints: ['./src/index.ts'], | ||
watch: flags.has('--watch'), | ||
platform: 'node', | ||
target: 'es2022', | ||
format: 'esm', | ||
} | ||
|
||
build(options).catch(() => process.exit(1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"name": "ks", | ||
"version": "0.1.0", | ||
"description": "A kick-starter for the Typescript projects.", | ||
"repository": "github:tenzyu/ks", | ||
"license": "MIT", | ||
"author": "Tenzyu Masuda", | ||
"type": "module", | ||
"bin": "./bin/ks", | ||
"scripts": { | ||
"build": "rimraf dist && node build.js --minify" | ||
}, | ||
"lint-staged": { | ||
"*": "prettier --write --cache --ignore-unknown", | ||
"!(package).json": "sort-json", | ||
"package.json": "sort-package-json" | ||
}, | ||
"files": [ | ||
"bin", | ||
"dist" | ||
], | ||
"dependencies": { | ||
"zx": "^7.1.1" | ||
}, | ||
"devDependencies": { | ||
"@commitlint/cli": "^17.3.0", | ||
"@commitlint/config-conventional": "^17.3.0", | ||
"@tenzyu/tsconfig": "^0.1.4", | ||
"esbuild": "^0.16.4", | ||
"husky": "^8.0.2", | ||
"lint-staged": "^13.1.0", | ||
"prettier": "^2.8.1", | ||
"rimraf": "^3.0.2", | ||
"sort-package-json": "^2.1.0", | ||
"typescript": "^4.9.4" | ||
} | ||
} |
Oops, something went wrong.