Skip to content

Commit fe8786b

Browse files
committed
feat(projects): init project
0 parents  commit fe8786b

19 files changed

+6759
-0
lines changed

Diff for: .editorconfig

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Editor configuration, see http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
indent_style = space
8+
indent_size = 2
9+
end_of_line = lf
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true

Diff for: .gitattributes

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
"*.js" eol=lf
2+
"*.ts" eol=lf
3+
"*.jsx" eol=lf
4+
"*.tsx" eol=lf
5+
"*.cjs" eol=lf
6+
"*.cts" eol=lf
7+
"*.mjs" eol=lf
8+
"*.mts" eol=lf
9+
"*.html" eol=lf
10+
"*.css" eol=lf
11+
"*.vue" eol=lf
12+
"*.json" eol=lf
13+
"*.less" eol=lf
14+
"*.scss" eol=lf
15+
"*.sass" eol=lf
16+
"*.styl" eol=lf
17+
"*.svelte" eol=lf
18+
"*.md" eol=lf
19+
"*.yml" eol=lf
20+
"*.astro" eol=lf
21+
"*.mdx" eol=lf

Diff for: .github/workflows/release.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
release:
10+
permissions:
11+
id-token: write
12+
contents: write
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Install pnpm
20+
uses: pnpm/action-setup@v2
21+
22+
- name: Set node
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: lts/*
26+
cache: pnpm
27+
registry-url: "https://registry.npmjs.org"
28+
29+
- run: npx githublogen
30+
env:
31+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
32+
33+
- name: Install Dependencies
34+
run: pnpm install --no-frozen-lockfile
35+
36+
- name: PNPM build
37+
run: pnpm run build
38+
39+
- name: Publish to NPM
40+
run: pnpm -r publish --access public --no-git-checks
41+
env:
42+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
43+
NPM_CONFIG_PROVENANCE: true

Diff for: .gitignore

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
.DS_Store
12+
dist
13+
dist-ssr
14+
coverage
15+
*.local
16+
17+
/cypress/videos/
18+
/cypress/screenshots/
19+
20+
# Editor directories and files
21+
.vscode/*
22+
!.vscode/extensions.json
23+
!.vscode/settings.json
24+
!.vscode/launch.json
25+
.idea
26+
*.suo
27+
*.ntvs*
28+
*.njsproj
29+
*.sln
30+
*.sw?

Diff for: .npmrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
registry=https://registry.npmmirror.com/
2+
shamefully-hoist=true

Diff for: .prettierrc

Whitespace-only changes.

Diff for: .vscode/extensions.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"recommendations": [
3+
"antfu.unocss",
4+
"dbaeumer.vscode-eslint",
5+
"editorconfig.editorconfig",
6+
"esbenp.prettier-vscode",
7+
"formulahendry.auto-complete-tag",
8+
"formulahendry.auto-close-tag",
9+
"formulahendry.auto-rename-tag",
10+
"kisstkondoros.vscode-gutter-preview",
11+
"mhutchie.git-graph"
12+
]
13+
}

Diff for: .vscode/launch.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"version": "1.0.0",
3+
"configurations": [
4+
{
5+
"type": "node",
6+
"request": "launch",
7+
"name": "TS debugger",
8+
"skipFiles": ["<node_internals>/**"],
9+
"runtimeArgs": ["--loader", "tsx"],
10+
"program": "${relativeFile}"
11+
}
12+
]
13+
}

Diff for: .vscode/settings.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"editor.codeActionsOnSave": {
3+
"source.fixAll.eslint": "explicit",
4+
"source.organizeImports": "never"
5+
},
6+
"eslint.experimental.useFlatConfig": true,
7+
"editor.formatOnSave": false,
8+
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact", "json", "jsonc", "json5"],
9+
"prettier.enable": false
10+
}

Diff for: README.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# prettier-plugin-json-sort
2+
3+
A prettier plugin to sort package.json and tsconfig.json.
4+
5+
Powered by [prettier-plugin-pkg](https://github.com/un-ts/prettier/tree/master/packages/pkg)

Diff for: build.config.ts

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { URL, fileURLToPath } from 'node:url';
2+
import { defineBuildConfig } from 'unbuild';
3+
4+
export default defineBuildConfig({
5+
alias: {
6+
'@': fileURLToPath(new URL('./src', import.meta.url))
7+
},
8+
entries: ['src/index'],
9+
clean: true,
10+
declaration: true,
11+
rollup: {
12+
emitCJS: true,
13+
inlineDependencies: true,
14+
esbuild: {
15+
minify: true
16+
}
17+
}
18+
});

Diff for: eslint.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { defineConfig } from '@soybeanjs/eslint-config';
2+
3+
export default defineConfig();

Diff for: package.json

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"name": "prettier-plugin-json-sort",
3+
"type": "module",
4+
"version": "0.0.0",
5+
"packageManager": "[email protected]",
6+
"author": {
7+
"name": "Soybean",
8+
"email": "[email protected]",
9+
"url": "https://github.com/soybeanjs"
10+
},
11+
"license": "MIT",
12+
"homepage": "https://github.com/soybeanjs/prettier-plugin-json-sort",
13+
"repository": {
14+
"url": "https://github.com/soybeanjs/prettier-plugin-json-sort.git"
15+
},
16+
"bugs": {
17+
"url": "https://github.com/soybeanjs/prettier-plugin-json-sort/issues"
18+
},
19+
"publishConfig": {
20+
"registry": "https://registry.npmjs.org/"
21+
},
22+
"exports": {
23+
".": {
24+
"types": "./dist/index.d.ts",
25+
"import": "./dist/index.mjs",
26+
"require": "./dist/index.cjs"
27+
}
28+
},
29+
"main": "dist/index.cjs",
30+
"module": "dist/index.mjs",
31+
"types": "dist/index.d.ts",
32+
"files": ["dist"],
33+
"scripts": {
34+
"build": "unbuild",
35+
"typecheck": "tsc --noEmit --skipLibCheck",
36+
"lint": "eslint . --fix",
37+
"commit": "soy git-commit",
38+
"cleanup": "soy cleanup",
39+
"update-pkg": "soy ncu",
40+
"publish-pkg": "pnpm publish --access public",
41+
"release": "soy release",
42+
"prepare": "simple-git-hooks"
43+
},
44+
"peerDependencies": {
45+
"prettier": ">=2.0.0"
46+
},
47+
"devDependencies": {
48+
"@soybeanjs/cli": "0.8.2",
49+
"@soybeanjs/eslint-config": "1.0.5",
50+
"@types/node": "20.10.4",
51+
"eslint": "8.55.0",
52+
"lint-staged": "15.2.0",
53+
"prettier": "3.1.0",
54+
"simple-git-hooks": "2.9.0",
55+
"tsx": "4.6.2",
56+
"typescript": "5.3.3",
57+
"unbuild": "2.0.0"
58+
},
59+
"simple-git-hooks": {
60+
"commit-msg": "pnpm soy git-commit-verify",
61+
"pre-commit": "pnpm typecheck && pnpm lint-staged"
62+
},
63+
"lint-staged": {
64+
"*": "eslint --fix"
65+
}
66+
}

0 commit comments

Comments
 (0)