Skip to content

Commit b291caf

Browse files
authored
feat: Nuxi Integration
Nuxi CLI Support.
2 parents 06c59d4 + 2d2c2a7 commit b291caf

File tree

18 files changed

+620
-254
lines changed

18 files changed

+620
-254
lines changed

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"@typescript-eslint"
1010
],
1111
"rules": {
12-
"@typescript-eslint/naming-convention": "warn",
12+
"@typescript-eslint/naming-convention": "off",
1313
"@typescript-eslint/semi": 0,
1414
"curly": [
1515
"error",

README.md

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@
3232

3333
- [Project directories and files creation](#project-directories-and-files-creation)
3434
- [Dependencies management](#dependencies-management)
35-
- [Nuxt/Custom Snippets](#nuxtcustom-snippets)
3635
- [IntelliSense and Auto Completion](#intellisense-and-auto-completion)
36+
- [Nuxi CLI Integration](#nuxi-cli-integration)
37+
- [Nuxt/Custom Snippets](#nuxtcustom-snippets)
3738
- [Vue File Templates](#vue-file-templates)
3839
- [srcDir, serverDir and monorepo support](#srcdir-serverdir-and-monorepo-support)
3940
- [Run scripts from the VSCode command palette or sidebar.](#run-scripts-from-the-vscode-command-palette-or-sidebar)
@@ -87,6 +88,31 @@ And auto open the created file using:
8788

8889
![Nuxt Dependencies](./.github/media/dependencies.png)
8990

91+
<br>
92+
<br>
93+
94+
### IntelliSense and Auto Completion
95+
96+
Nuxtr VSCode offers a robust IntelliSense with focused support for Vue files, offering relative path completion from the pages directory for [NuxtLinks](https://nuxt.com/docs/api/components/nuxt-link#internal-routing) and from the [public or static directories](https://nuxt.com/docs/guide/directory-structure/public) for media resources, depending on your Nuxt version. Moreover, it offers IntelliSense for essential configuration files like [`.nuxtignore`](https://nuxt.com/docs/guide/directory-structure/nuxtignore) and [`.nuxtrc`](), empowering you with accurate insights and efficient coding.
97+
98+
You can enable/disable IntelliSense from the settings:
99+
100+
```JSON
101+
"nuxtr.intellisense.nuxtrc": true,
102+
"nuxtr.intellisense.vueFiles": true,
103+
"nuxtr.intellisense.nuxtignore": true,
104+
```
105+
106+
<br>
107+
<br>
108+
109+
### Nuxi CLI Integration
110+
111+
The Nuxt CLI, also known as [Nuxi](https://github.com/nuxt/cli), stands as an indispensable tool in the arsenal of every Nuxt developer. Nuxtr seamlessly incorporates this powerful CLI, allowing you to execute Nuxi commands right from the command palette. Under the `Nuxtr: Run` prefix, you'll find a set of pre-defined most-used commands readily available. Additionally, you have the option to access the complete list of Nuxi commands through the `Nuxtr: Nuxi CLI` command.
112+
113+
While it's entirely sensible to employ the CLI directly from your terminal, Nuxtr's inclusion will enhance your DX working with multiple terminals. It provides a structured approach to your terminal environment, categorizing commands based on their scope. This not only streamlines your workflow but also simplifies the process of adding modules, eliminating the need to recall or search for exact names.
114+
115+
90116
<br>
91117
<br>
92118

@@ -114,20 +140,6 @@ More on this side of the extension is coming soon!
114140

115141
![Snippets](./.github/media/snippets.gif)
116142

117-
<br>
118-
<br>
119-
120-
### IntelliSense and Auto Completion
121-
122-
Nuxtr VSCode offers a robust IntelliSense with focused support for Vue files, offering relative path completion from the pages directory for [NuxtLinks](https://nuxt.com/docs/api/components/nuxt-link#internal-routing) and from the [public or static directories](https://nuxt.com/docs/guide/directory-structure/public) for media resources, depending on your Nuxt version. Moreover, it offers IntelliSense for essential configuration files like [`.nuxtignore`](https://nuxt.com/docs/guide/directory-structure/nuxtignore) and [`.nuxtrc`](), empowering you with accurate insights and efficient coding.
123-
124-
You can enable/disable IntelliSense from the settings:
125-
126-
```JSON
127-
"nuxtr.intellisense.nuxtrc": true,
128-
"nuxtr.intellisense.vueFiles": true,
129-
"nuxtr.intellisense.nuxtignore": true,
130-
```
131143

132144
<br>
133145
<br>

package.json

Lines changed: 52 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "Nuxtr",
44
"description": "An extension for Nuxt.js offering commands and tools to make your experience more pleasant.",
55
"version": "0.1.11",
6-
"packageManager": "pnpm@8.7.5",
6+
"packageManager": "pnpm@8.8.0",
77
"engines": {
88
"vscode": "^1.82.0"
99
},
@@ -192,6 +192,26 @@
192192
"command": "nuxtr.createNitroAPI",
193193
"when": "nuxtr.isNuxtProject"
194194
},
195+
{
196+
"command": "nuxtr.createNitroPlugin",
197+
"when": "nuxtr.isNuxtProject"
198+
},
199+
{
200+
"command": "nuxtr.createNitroUtil",
201+
"when": "nuxtr.isNuxtProject"
202+
},
203+
{
204+
"command": "nuxtr.createNitroMiddleware",
205+
"when": "nuxtr.isNuxtProject"
206+
},
207+
{
208+
"command": "nuxtr.createNitroRoute",
209+
"when": "nuxtr.isNuxtProject"
210+
},
211+
{
212+
"command": "nuxtr.directCreateUtil",
213+
"when": "false"
214+
},
195215
{
196216
"command": "nuxtr.openSettings",
197217
"when": "nuxtr.isNuxtProject"
@@ -225,11 +245,11 @@
225245
"when": "nuxtr.isNuxtProject"
226246
},
227247
{
228-
"command": "nuxtr.nuxtAnalyze",
248+
"command": "nuxtr.showCLICommands",
229249
"when": "nuxtr.isNuxtProject"
230250
},
231251
{
232-
"command": "nuxtr.nuxtBuildModule",
252+
"command": "nuxtr.nuxtAnalyze",
233253
"when": "nuxtr.isNuxtProject"
234254
},
235255
{
@@ -351,6 +371,10 @@
351371
{
352372
"command": "nuxtr.createFileFromTemplate",
353373
"when": "false"
374+
},
375+
{
376+
"command": "nuxtr.globalState",
377+
"when": "false"
354378
}
355379
],
356380
"view/title": [
@@ -750,43 +774,43 @@
750774
},
751775
{
752776
"command": "nuxtr.nuxtDev",
753-
"title": "Run Nuxt Dev",
777+
"title": "Run Nuxi Dev",
754778
"category": "Nuxtr",
755779
"when": "nuxtr.isNuxtProject"
756780
},
757781
{
758782
"command": "nuxtr.nuxtBuild",
759-
"title": "Run Nuxt Build",
783+
"title": "Run Nuxi Build",
760784
"category": "Nuxtr",
761785
"when": "nuxtr.isNuxtProject"
762786
},
763787
{
764788
"command": "nuxtr.nuxtGenerate",
765-
"title": "Run Nuxt Generate",
789+
"title": "Run Nuxi Generate",
766790
"category": "Nuxtr",
767791
"when": "nuxtr.isNuxtProject"
768792
},
769793
{
770794
"command": "nuxtr.nuxtCleanUp",
771-
"title": "Run Nuxt CleanUp",
795+
"title": "Run Nuxi CleanUp",
772796
"category": "Nuxtr",
773797
"when": "nuxtr.isNuxtProject"
774798
},
775799
{
776800
"command": "nuxtr.nuxtInfo",
777-
"title": "Run Nuxt Info",
801+
"title": "Run Nuxi Info",
778802
"category": "Nuxtr",
779803
"when": "nuxtr.isNuxtProject"
780804
},
781805
{
782-
"command": "nuxtr.nuxtAnalyze",
783-
"title": "Run Nuxt Analyze",
806+
"command": "nuxtr.showCLICommands",
807+
"title": "Nuxi CLI",
784808
"category": "Nuxtr",
785809
"when": "nuxtr.isNuxtProject"
786810
},
787811
{
788-
"command": "nuxtr.nuxtBuildModule",
789-
"title": "Run Nuxt Build Module",
812+
"command": "nuxtr.nuxtAnalyze",
813+
"title": "Run Nuxi Analyze",
790814
"category": "Nuxtr",
791815
"when": "nuxtr.isNuxtProject"
792816
},
@@ -911,6 +935,12 @@
911935
"title": "Create new Vue Template",
912936
"category": "Nuxtr",
913937
"when": "nuxtr.isNuxtProject"
938+
},
939+
{
940+
"command": "nuxtr.globalState",
941+
"title": "Global State",
942+
"category": "Nuxtr",
943+
"when": "nuxtr.isNuxtProject"
914944
}
915945
],
916946
"keybindings": [],
@@ -1007,26 +1037,28 @@
10071037
"publish:pre": "vsce publish --pre-release --no-dependencies"
10081038
},
10091039
"devDependencies": {
1010-
"@types/mocha": "^10.0.1",
1040+
"@types/mocha": "^10.0.2",
10111041
"@types/node": "20.4.1",
10121042
"@types/vscode": "^1.82.0",
1013-
"@typescript-eslint/eslint-plugin": "^6.7.0",
1014-
"@typescript-eslint/parser": "^6.7.0",
1043+
"@typescript-eslint/eslint-plugin": "^6.7.3",
1044+
"@typescript-eslint/parser": "^6.7.3",
10151045
"@vscode/test-electron": "^2.3.4",
10161046
"esbuild": "^0.19.3",
1017-
"eslint": "^8.49.0",
1047+
"eslint": "^8.50.0",
10181048
"mocha": "^10.2.0",
10191049
"typescript": "^5.2.2"
10201050
},
10211051
"dependencies": {
1022-
"@nuxt/schema": "^3.7.3",
1023-
"@types/fs-extra": "^11.0.1",
1052+
"@nuxt/schema": "^3.7.4",
1053+
"@types/fs-extra": "^11.0.2",
10241054
"@types/util.promisify": "^1.0.5",
1025-
"axios": "^1.5.0",
1055+
"axios": "^1.5.1",
10261056
"destr": "^2.0.1",
10271057
"fs": "^0.0.1-security",
10281058
"fs-extra": "^11.1.1",
1059+
"jiti": "^1.20.0",
10291060
"magicast": "^0.2.11",
1061+
"nuxi-edge": "3.9.0-1694711034.61383d1",
10301062
"path": "^0.12.7",
10311063
"pkg-types": "^1.0.3",
10321064
"util": "^0.12.5"
@@ -1036,4 +1068,4 @@
10361068
"magicast": "0.2.10"
10371069
}
10381070
}
1039-
}
1071+
}

0 commit comments

Comments
 (0)