Skip to content

Commit 8ad697f

Browse files
authored
feat: Project creation command
feat: Project creation command
2 parents 701518e + 0391cb6 commit 8ad697f

File tree

15 files changed

+474
-226
lines changed

15 files changed

+474
-226
lines changed

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
### What does Nuxtr do?
2323

24+
- [Project Creation](#project-creation)
2425
- [Directory and File Creation](#directory-and-file-creation)
2526
- [Dependencies management](#dependencies-management)
2627
- [IntelliSense and Auto Completion](#intellisense-and-auto-completion)
@@ -36,6 +37,23 @@
3637
<br>
3738
<br>
3839

40+
### Project Creation
41+
42+
Using `Nuxtr: Create Nuxt project` command, you can create a new Nuxt project with a few steps. You can choose a project starter from [Nuxt Startes](https://nuxt.new) or you can add your own project started:
43+
44+
```JSON
45+
"nuxtr.projectTemplates": [
46+
{
47+
"name": "Vitesse",
48+
"description": " Vitesse for Nuxt 3 🏔💚⚡️ ",
49+
"repoURL": "https://github.com/antfu/vitesse-nuxt3",
50+
"branch": "main", // Optional
51+
},
52+
],
53+
```
54+
55+
<br>
56+
3957
### Directory and File Creation
4058

4159
Effortlessly generate all essential directories and files for your Nuxt project right from within VSCode. Utilize the command palette or context menus to swiftly create Vue/TypeScript files, as well as special files like [`.nuxtignore`](https://nuxt.com/docs/guide/directory-structure/nuxtignore), [`.nuxtrc`](https://nuxt.com/docs/api/configuration/nuxt-config), and [`app.config.ts`](https://nuxt.com/docs/guide/directory-structure/app-config).
@@ -87,7 +105,7 @@ Additionally, you can choose to automatically open the newly created file with:
87105

88106
### IntelliSense and Auto Completion
89107

90-
Nuxtr VSCode offers robust IntelliSense capabilities tailored for Vue files. This includes dynamic path completion for [NuxtLinks](https://nuxt.com/docs/api/components/nuxt-link#internal-routing) within the pages directory, and seamless handling of media resources from the [public or static directories](https://nuxt.com/docs/guide/directory-structure/public), depending on your Nuxt version. Additionally, enjoy IntelliSense support for critical configuration files like [`.nuxtignore`](https://nuxt.com/docs/guide/directory-structure/nuxtignore) and [`.nuxtrc`](https://nuxt.com/docs/guide/directory-structure/nuxtrc), ensuring precise guidance and efficient coding.
108+
Nuxtr offers robust IntelliSense capabilities tailored for Vue files. This includes dynamic path completion for [NuxtLinks](https://nuxt.com/docs/api/components/nuxt-link#internal-routing) within the pages directory, and seamless handling of media resources from the [public or static directories](https://nuxt.com/docs/guide/directory-structure/public), depending on your Nuxt version. Additionally, enjoy IntelliSense support for critical configuration files like [`.nuxtignore`](https://nuxt.com/docs/guide/directory-structure/nuxtignore) and [`.nuxtrc`](https://nuxt.com/docs/guide/directory-structure/nuxtrc), ensuring precise guidance and efficient coding.
91109

92110
You can enable/disable IntelliSense from the settings:
93111

@@ -242,7 +260,7 @@ If you have any idea, feel free to [open a discussion](https://github.com/orgs/n
242260

243261
### Acknowledgements
244262

245-
Nuxtr VSCode relies on the following projects/repositories:
263+
Nuxtr relies on the following projects/repositories:
246264

247265
- [Nuxt Modules](https://github.com/nuxt/modules)
248266
- [Nuxt Assets](https://github.com/nuxt/assets)

package.json

Lines changed: 42 additions & 6 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.2.10",
6-
"packageManager": "pnpm@8.11.0",
6+
"packageManager": "pnpm@8.12.1",
77
"engines": {
88
"vscode": "^1.84.0"
99
},
@@ -497,6 +497,36 @@
497497
"type": "string",
498498
"default": null,
499499
"description": "Nuxt project path inside your monorepo"
500+
},
501+
"nuxtr.projectTemplates": {
502+
"type": "array",
503+
"default": [],
504+
"items": {
505+
"type": "object",
506+
"properties": {
507+
"name": {
508+
"type": "string",
509+
"description": "Template Name."
510+
},
511+
"description": {
512+
"type": "string",
513+
"description": "Description template."
514+
},
515+
"repoURL": {
516+
"type": "string",
517+
"description": "Repo URL of the template."
518+
},
519+
"branch": {
520+
"type": "string",
521+
"description": "Branch of the template."
522+
}
523+
},
524+
"required": [
525+
"name",
526+
"description",
527+
"repoURL"
528+
]
529+
}
500530
}
501531
}
502532
},
@@ -971,6 +1001,11 @@
9711001
"title": "Global State",
9721002
"category": "Nuxtr",
9731003
"when": "nuxtr.isNuxtProject"
1004+
},
1005+
{
1006+
"command": "nuxtr.createProject",
1007+
"title": "Create new Nuxt Project",
1008+
"category": "Nuxtr"
9741009
}
9751010
],
9761011
"keybindings": [],
@@ -1066,22 +1101,23 @@
10661101
"@types/mocha": "^10.0.6",
10671102
"@types/node": "20.4.1",
10681103
"@types/util.promisify": "^1.0.8",
1069-
"@types/vscode": "^1.84.2",
1070-
"@typescript-eslint/eslint-plugin": "^6.13.2",
1071-
"@typescript-eslint/parser": "^6.13.2",
1104+
"@types/vscode": "^1.85.0",
1105+
"@typescript-eslint/eslint-plugin": "^6.14.0",
1106+
"@typescript-eslint/parser": "^6.14.0",
10721107
"@vscode/test-electron": "^2.3.8",
10731108
"changelogen": "^0.5.5",
1074-
"eslint": "^8.55.0",
1109+
"eslint": "^8.56.0",
10751110
"nuxi-edge": "3.9.1-1697113884.a6acb6a",
10761111
"taze": "^0.11.4",
1077-
"terser": "^5.25.0",
1112+
"terser": "^5.26.0",
10781113
"tsup": "^7.3.0",
10791114
"typescript": "^5.3.3"
10801115
},
10811116
"dependencies": {
10821117
"@nuxt/schema": "^3.8.2",
10831118
"destr": "^2.0.2",
10841119
"fs-extra": "^11.2.0",
1120+
"giget": "^1.1.3",
10851121
"jiti": "^1.21.0",
10861122
"magicast": "^0.3.2",
10871123
"ofetch": "^1.3.3",

0 commit comments

Comments
 (0)