Skip to content

Commit 829c89a

Browse files
authored
Initial commit
0 parents  commit 829c89a

23 files changed

+6488
-0
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [antfu]

.github/workflows/ci.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
pull_request:
9+
branches:
10+
- main
11+
12+
jobs:
13+
lint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Install pnpm
19+
uses: pnpm/action-setup@v2
20+
21+
- name: Set node
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: lts/*
25+
cache: pnpm
26+
27+
- name: Setup
28+
run: npm i -g @antfu/ni
29+
30+
- name: Install
31+
run: nci
32+
33+
- name: Lint
34+
run: nr lint
35+
36+
typecheck:
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v3
40+
41+
- name: Install pnpm
42+
uses: pnpm/action-setup@v2
43+
44+
- name: Set node
45+
uses: actions/setup-node@v3
46+
with:
47+
node-version: lts/*
48+
cache: pnpm
49+
50+
- name: Setup
51+
run: npm i -g @antfu/ni
52+
53+
- name: Install
54+
run: nci
55+
56+
- name: Typecheck
57+
run: nr typecheck
58+
59+
test:
60+
runs-on: ${{ matrix.os }}
61+
62+
strategy:
63+
matrix:
64+
node: [lts/*]
65+
os: [ubuntu-latest, windows-latest, macos-latest]
66+
fail-fast: false
67+
68+
steps:
69+
- uses: actions/checkout@v3
70+
71+
- name: Install pnpm
72+
uses: pnpm/action-setup@v2
73+
74+
- name: Set node version to ${{ matrix.node }}
75+
uses: actions/setup-node@v3
76+
with:
77+
node-version: ${{ matrix.node }}
78+
cache: pnpm
79+
80+
- name: Setup
81+
run: npm i -g @antfu/ni
82+
83+
- name: Install
84+
run: nci
85+
86+
- name: Build
87+
run: nr build
88+
89+
- name: Test
90+
run: nr test

.github/workflows/release.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Release
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
push:
8+
tags:
9+
- 'v*'
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: lts/*
22+
23+
- run: npx changelogithub
24+
env:
25+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.cache
2+
.DS_Store
3+
.idea
4+
*.log
5+
*.tgz
6+
*.vsix
7+
coverage
8+
dist
9+
lib-cov
10+
logs
11+
node_modules
12+
temp
13+
src/generated

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ignore-workspace-root-check=true
2+
node-linker=hoisted

.vscode/extensions.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"recommendations": [
3+
"amodio.tsl-problem-matcher",
4+
"emeraldwalk.runonsave"
5+
]
6+
}

.vscode/launch.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Extension",
6+
"type": "extensionHost",
7+
"request": "launch",
8+
"runtimeExecutable": "${execPath}",
9+
"args": [
10+
"--extensionDevelopmentPath=${workspaceFolder}"
11+
],
12+
"outFiles": [
13+
"${workspaceFolder}/dist/**/*.js"
14+
],
15+
"preLaunchTask": "npm: dev"
16+
}
17+
]
18+
}

.vscode/settings.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
// Auto generate metadata
3+
"emeraldwalk.runonsave": {
4+
"commands": [
5+
{
6+
"match": "package.json",
7+
"isAsync": true,
8+
"cmd": "npm run update"
9+
}
10+
]
11+
},
12+
13+
// Disable the default formatter, use eslint instead
14+
"prettier.enable": false,
15+
"editor.formatOnSave": false,
16+
17+
// Auto fix
18+
"editor.codeActionsOnSave": {
19+
"source.fixAll.eslint": "explicit",
20+
"source.organizeImports": "never"
21+
},
22+
23+
// Silent the stylistic rules in you IDE, but still auto fix them
24+
"eslint.rules.customizations": [
25+
{ "rule": "style/*", "severity": "off" },
26+
{ "rule": "*-indent", "severity": "off" },
27+
{ "rule": "*-spacing", "severity": "off" },
28+
{ "rule": "*-spaces", "severity": "off" },
29+
{ "rule": "*-order", "severity": "off" },
30+
{ "rule": "*-dangle", "severity": "off" },
31+
{ "rule": "*-newline", "severity": "off" },
32+
{ "rule": "*quotes", "severity": "off" },
33+
{ "rule": "*semi", "severity": "off" }
34+
],
35+
36+
// Enable eslint for all supported languages
37+
"eslint.validate": [
38+
"javascript",
39+
"javascriptreact",
40+
"typescript",
41+
"typescriptreact",
42+
"vue",
43+
"html",
44+
"markdown",
45+
"json",
46+
"jsonc",
47+
"yaml"
48+
]
49+
}

.vscode/tasks.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// See https://go.microsoft.com/fwlink/?LinkId=733558
2+
// for the documentation about the tasks.json format
3+
{
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"type": "npm",
8+
"script": "dev",
9+
"isBackground": true,
10+
"presentation": {
11+
"reveal": "never"
12+
},
13+
"problemMatcher": [
14+
{
15+
"base": "$ts-webpack-watch",
16+
"background": {
17+
"activeOnStart": true,
18+
"beginsPattern": "Build start",
19+
"endsPattern": "Build success"
20+
}
21+
}
22+
],
23+
"group": "build"
24+
}
25+
]
26+
}

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Anthony Fu <https://github.com/antfu>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# ext-name
2+
3+
<a href="https://marketplace.visualstudio.com/items?itemName=antfu.ext-name" target="__blank"><img src="https://img.shields.io/visual-studio-marketplace/v/antfu.ext-name.svg?color=eee&amp;label=VS%20Code%20Marketplace&logo=visual-studio-code" alt="Visual Studio Marketplace Version" /></a>
4+
<a href="https://kermanx.github.io/reactive-vscode/" target="__blank"><img src="https://img.shields.io/badge/made_with-reactive--vscode-%23007ACC?style=flat&labelColor=%23229863" alt="Made with reactive-vscode" /></a>
5+
6+
## Configurations
7+
8+
<!-- configs -->
9+
<!-- empty -->
10+
<!-- configs -->
11+
12+
## Commands
13+
14+
<!-- commands -->
15+
<!-- empty -->
16+
<!-- commands -->
17+
18+
## Sponsors
19+
20+
<p align="center">
21+
<a href="https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg">
22+
<img src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.png'/>
23+
</a>
24+
</p>
25+
26+
## License
27+
28+
[MIT](./LICENSE.md) License © 2022 [Anthony Fu](https://github.com/antfu)

eslint.config.mjs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// @ts-check
2+
import antfu from '@antfu/eslint-config'
3+
4+
export default antfu(
5+
{
6+
ignores: [
7+
// eslint ignore globs here
8+
],
9+
},
10+
{
11+
rules: {
12+
// overrides
13+
},
14+
},
15+
)

package.json

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{
2+
"publisher": "antfu",
3+
"name": "ext-name",
4+
"displayName": "ext-name",
5+
"version": "0.0.0",
6+
"private": true,
7+
"packageManager": "pnpm@9.7.1",
8+
"description": "",
9+
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
10+
"license": "MIT",
11+
"funding": "https://github.com/sponsors/antfu",
12+
"homepage": "https://github.com/antfu/ext-name#readme",
13+
"repository": {
14+
"type": "git",
15+
"url": "https://github.com/antfu/ext-name"
16+
},
17+
"bugs": {
18+
"url": "https://github.com/antfu/ext-name/issues"
19+
},
20+
"sponsor": {
21+
"url": "https://github.com/sponsors/antfu"
22+
},
23+
"categories": [
24+
"Other"
25+
],
26+
"main": "./dist/index.js",
27+
"icon": "res/icon.png",
28+
"files": [
29+
"LICENSE.md",
30+
"dist/*",
31+
"res/*"
32+
],
33+
"engines": {
34+
"vscode": "^1.92.0"
35+
},
36+
"activationEvents": [
37+
"onStartupFinished"
38+
],
39+
"contributes": {
40+
"commands": [],
41+
"configuration": {
42+
"type": "object",
43+
"title": "ext-name",
44+
"properties": {}
45+
}
46+
},
47+
"scripts": {
48+
"build": "tsup src/index.ts --external vscode",
49+
"dev": "nr build --watch",
50+
"prepare": "nr update",
51+
"update": "vscode-ext-gen --output src/generated/meta.ts",
52+
"lint": "eslint .",
53+
"vscode:prepublish": "nr build",
54+
"publish": "vsce publish --no-dependencies",
55+
"pack": "vsce package --no-dependencies",
56+
"test": "vitest",
57+
"typecheck": "tsc --noEmit",
58+
"release": "bumpp && nr publish"
59+
},
60+
"devDependencies": {
61+
"@antfu/eslint-config": "^2.26.0",
62+
"@antfu/ni": "^0.22.4",
63+
"@types/node": "^22.4.1",
64+
"@types/vscode": "^1.92.0",
65+
"@vscode/vsce": "^3.0.0",
66+
"bumpp": "^9.5.1",
67+
"eslint": "^9.9.0",
68+
"esno": "^4.7.0",
69+
"pnpm": "^9.7.1",
70+
"reactive-vscode": "^0.2.0",
71+
"tsup": "^8.2.4",
72+
"typescript": "^5.5.4",
73+
"vite": "^5.4.1",
74+
"vitest": "^2.0.5",
75+
"vscode-ext-gen": "^0.4.1"
76+
}
77+
}

0 commit comments

Comments
 (0)