Skip to content

Commit f387838

Browse files
committed
initialize vscode-react-native-directory extension
0 parents  commit f387838

File tree

14 files changed

+1188
-0
lines changed

14 files changed

+1188
-0
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
build
2+
node_modules
3+
4+
# VS Code
5+
*.vsix
6+
7+
# IDEA
8+
.idea
9+
*.iml

.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.1.0",
3+
"configurations": [
4+
{
5+
"name": "Run with extension",
6+
"type": "extensionHost",
7+
"request": "launch",
8+
"runtimeExecutable": "${execPath}",
9+
"args": [
10+
"${workspaceFolder}",
11+
"--extensionDevelopmentPath=${workspaceFolder}"
12+
],
13+
"outFiles": [
14+
"${workspaceFolder}/build/**"
15+
]
16+
}
17+
]
18+
}

.vscodeignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# switch to allow-list, ignore everything
2+
**
3+
4+
# only include these files
5+
!assets/icon.png
6+
!build/**
7+
!LICENSE.md
8+
!package.json
9+
!README.md

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) 2025 React Native Community
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: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<dd align="center"><img alt="React Native Directory Logo" height="96" src="./assets/icon.png" /></dd>
2+
<h1 align="center">vscode-react-native-directory</h1>
3+
4+
<img alt="Extension preview" src="./assets/screenshot.png" />
5+
6+
A VS Code extension allowing to browse through React Native Directory and perform actions on the packages inside build-in Command Palette.
7+
8+
## Installation
9+
10+
> [!tip]
11+
> The extension is currently in the development phase, and only manual build and installation is supported at this time.
12+
13+
1. Make sure you have [Bun](https://bun.sh/docs/installation) installed.
14+
2. Checkout the repository locally.
15+
3. Run `bun install && bun compile && bun package` to to install dependencies, compile source and prepare extension package file.
16+
4. In VS Code:
17+
* Navigate to the "Extensions" pane (<kbd>Ctrl/Cmd+Shift+X</kbd>).
18+
* Click "More" button (three dots in the right corner of header) and select "Install from VSIX".
19+
* Select VSIX file which has been created in third step inside the checkout root directory.
20+
21+
## Contributing
22+
23+
1. Make sure you have [Bun](https://bun.sh/docs/installation) installed.
24+
2. Checkout the repository locally.
25+
3. Run `bun install && bun compile` to install dependencies and compile source.
26+
4. In VS Code:
27+
* Open folder containing the extension repository.
28+
* Navigate to the "Run and Debug" pane (<kbd>Ctrl/Cmd+Shift+D</kbd>).
29+
* Select "Run with extension" launch task and press "Start Debugging" button (<kbd>F5</kbd>).

assets/icon.png

11.3 KB
Loading

assets/screenshot.png

297 KB
Loading

bun.lock

Lines changed: 733 additions & 0 deletions
Large diffs are not rendered by default.

eslint.config.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import eslint from '@eslint/js';
2+
import type { Linter } from 'eslint';
3+
import pluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
4+
import globals from 'globals';
5+
import pluginTS from 'typescript-eslint';
6+
7+
const config: Linter.Config[] = [
8+
{
9+
ignores: ['**/build', '**/node_modules']
10+
},
11+
eslint.configs.recommended,
12+
...(pluginTS.configs.recommended as Linter.Config[]),
13+
pluginPrettierRecommended,
14+
{
15+
languageOptions: {
16+
globals: globals.node
17+
},
18+
rules: {
19+
'prettier/prettier': [
20+
'warn',
21+
{
22+
printWidth: 120,
23+
singleQuote: true,
24+
trailingComma: 'none',
25+
endOfLine: 'auto'
26+
}
27+
]
28+
}
29+
}
30+
];
31+
32+
export default config;

package.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"name": "vscode-react-native-directory",
3+
"displayName": "React Native Directory",
4+
"description": "Find and install right packages for all of your React Native apps right from VS Code.",
5+
"publisher": "react-native-community",
6+
"categories": ["Other"],
7+
"keywords": ["react", "react-native", "directory", "search"],
8+
"license": "MIT",
9+
"repository": "github:react-native-community/vscode-react-native-directory",
10+
"homepage": "https://github.com/react-native-community/vscode-react-native-directory",
11+
"bugs": {
12+
"url": "https://github.com/react-native-community/vscode-react-native-directory/issues"
13+
},
14+
"icon": "./assets/icon.png",
15+
"activationEvents": ["onCommand:extension.showQuickPick"],
16+
"main": "./build/extension.js",
17+
"contributes": {
18+
"commands": [
19+
{
20+
"command": "extension.showQuickPick",
21+
"title": "React Native Directory: Search packages"
22+
}
23+
]
24+
},
25+
"version": "0.1.0",
26+
"engines": {
27+
"vscode": "^1.97.0"
28+
},
29+
"scripts": {
30+
"compile": "tsc -p .",
31+
"lint": "eslint .",
32+
"package": "vsce package"
33+
},
34+
"dependencies": {
35+
"axios": "^1.7.9",
36+
"preferred-pm": "^4.1.1"
37+
},
38+
"devDependencies": {
39+
"@eslint/js": "^9.20.0",
40+
"@types/node": "^22.13.4",
41+
"@types/vscode": "^1.97.0",
42+
"@vscode/vsce": "^3.2.2",
43+
"eslint": "^9.20.1",
44+
"eslint-config-prettier": "^10.0.1",
45+
"eslint-plugin-prettier": "^5.2.3",
46+
"globals": "^15.15.0",
47+
"jiti": "^2.4.2",
48+
"prettier": "^3.5.1",
49+
"typescript": "^5.7.3",
50+
"typescript-eslint": "^8.24.0"
51+
}
52+
}

0 commit comments

Comments
 (0)