Skip to content

Commit 21faa55

Browse files
authored
feat: init vscode extension for auto update (#37)
1 parent dcf1ce4 commit 21faa55

File tree

17 files changed

+1384
-60
lines changed

17 files changed

+1384
-60
lines changed

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"extends": "@antfu/basic"
2+
"extends": "@antfu"
33
}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
node_modules
22
yarn.lock
3+
package-lock.json
34
dist
5+
.DS_Store

.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}/extension"
11+
],
12+
"outFiles": [
13+
"${workspaceFolder}/extension/dist/**/*.js"
14+
],
15+
"preLaunchTask": "npm: ext:dev"
16+
},
17+
]
18+
}

.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": "ext: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+
}

extension/.vscodeignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.github/**
2+
.vscode/**
3+
.vscode-test/**
4+
node_modules

extension/LICENSE

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-Present Anthony Fu
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.

extension/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<br>
2+
3+
<p align="center">
4+
<img src="./res/logo.png" style="width:100px;" />
5+
</p>
6+
7+
<h1 align="center">File Nesting Updater</h1>
8+
9+
<p align="center">
10+
Auto updater for <a href="https://github.com/antfu/vscode-file-nesting-config" target="_blank"><code>vscode-file-nesting-config</code></a>
11+
</p>
12+
13+
<p align="center">
14+
<a href="https://marketplace.visualstudio.com/items?itemName=antfu.file-nesting" target="__blank"><img src="https://img.shields.io/visual-studio-marketplace/v/antfu.file-nesting.svg?color=blue&amp;label=VS%20Code%20Marketplace&logo=visual-studio-code" alt="Visual Studio Marketplace Version" /></a>
15+
</p>
16+
17+
Config to make your file tree cleaner by [the file nesting feature](https://code.visualstudio.com/updates/v1_64#_explorer-file-nesting) of VS Code.
18+
19+
![](https://user-images.githubusercontent.com/11247099/157142238-b00deecb-8d56-424f-9b20-ef6a6f5ddf99.png)
20+
21+
## Configurations
22+
23+
```json
24+
{
25+
"fileNestingUpdater.autoUpdate": true,
26+
"fileNestingUpdater.autoUpdateInterval": 720,
27+
"fileNestingUpdater.promptOnAutoUpdate": true,
28+
}
29+
```
30+
31+
It will check for update every 12 hours by default. You can also do it manually by executing command `File Nesting Updater: Update config now`.
32+
33+
## License
34+
35+
MIT

extension/package.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"name": "file-nesting",
3+
"displayName": "File Nesting Updater",
4+
"version": "0.0.0",
5+
"private": true,
6+
"description": "Auto updating for Anthony's file nesting config",
7+
"categories": [
8+
"Other"
9+
],
10+
"license": "MIT",
11+
"repository": {
12+
"type": "git",
13+
"url": "https://github.com/antfu/vscode-file-nesting-config",
14+
"directory": "extension"
15+
},
16+
"publisher": "antfu",
17+
"main": "./dist/index.js",
18+
"preview": true,
19+
"contributes": {
20+
"commands": [
21+
{
22+
"command": "antfu.file-nesting.manualUpdate",
23+
"title": "Update config now",
24+
"category": "File Nesting Updater"
25+
}
26+
],
27+
"configuration": {
28+
"type": "object",
29+
"title": "File Nesting Updater",
30+
"properties": {
31+
"fileNestingUpdater.autoUpdate": {
32+
"type": "boolean",
33+
"description": "Fetch and update the latest config automatically",
34+
"default": true
35+
},
36+
"fileNestingUpdater.promptOnAutoUpdate": {
37+
"type": "boolean",
38+
"description": "Should show up the prompt before doing auto update",
39+
"default": true
40+
},
41+
"fileNestingUpdater.autoUpdateInterval": {
42+
"type": "number",
43+
"description": "The minimal interval for auto update, in minutes",
44+
"default": 720
45+
}
46+
}
47+
}
48+
},
49+
"activationEvents": [
50+
"*"
51+
],
52+
"engines": {
53+
"vscode": "^1.65.0"
54+
},
55+
"icon": "res/logo.png"
56+
}

extension/res/logo.png

4.21 KB
Loading

extension/res/logo.svg

Lines changed: 6 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)