├── .editorconfig
├── .gitattributes
├── .github
└── FUNDING.yml
├── .gitignore
├── .husky
├── commit-msg
└── pre-commit
├── .lintstagedrc
├── .npmrc
├── .nvmrc
├── .vscode-test.mjs
├── .vscode
├── extensions.json
├── launch.json
├── settings.json
└── tasks.json
├── .vscodeignore
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── biome.json
├── commitlint.config.js
├── docs
├── cli-commands.md
├── context-menu.md
├── generate-files.md
├── images
│ ├── commands.png
│ ├── create-project.gif
│ ├── demo.gif
│ ├── json.gif
│ ├── menu-general.png
│ ├── menu-prisma.png
│ ├── preview.png
│ ├── settings.png
│ ├── snippets.png
│ └── workspace-settings.png
└── snippets.md
├── icon.png
├── package-lock.json
├── package.json
├── schemas
└── config.schema.json
├── snippets
├── drizzle.code-snippets
├── html.code-snippets
├── i18next.code-snippets
├── javascript.code-snippets
├── nextauth.code-snippets
├── nextjs.code-snippets
├── prisma.code-snippets
├── reactjs.code-snippets
├── tailwindcss.code-snippets
├── trpc.code-snippets
└── zod.code-snippets
├── src
├── app
│ ├── configs
│ │ ├── config.ts
│ │ ├── constants.ts
│ │ └── index.ts
│ ├── controllers
│ │ ├── feedback.controller.ts
│ │ ├── file.controller.ts
│ │ ├── index.ts
│ │ ├── list-files.controller.ts
│ │ ├── terminal.controller.ts
│ │ └── transform.controller.ts
│ ├── helpers
│ │ ├── command.helper.ts
│ │ ├── dialog.helper.ts
│ │ ├── filesystem.helper.ts
│ │ ├── index.ts
│ │ └── inflector.helper.ts
│ ├── models
│ │ ├── index.ts
│ │ └── node.model.ts
│ └── providers
│ │ ├── feedback.provider.ts
│ │ ├── index.ts
│ │ ├── list-components.providers.ts
│ │ ├── list-files.providers.ts
│ │ ├── list-hooks.providers.ts
│ │ └── list-routes.providers.ts
├── assets
│ └── logo.svg
├── extension.ts
└── test
│ └── extension.test.ts
├── tsconfig.doc.json
├── tsconfig.json
└── vsc-extension-quickstart.md
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig is awesome: https://EditorConfig.org
2 |
3 | # top-most EditorConfig file
4 | root = true
5 |
6 | [*.{ts,json}]
7 | charset = utf-8
8 | end_of_line = lf
9 | indent_size = 2
10 | indent_style = space
11 | insert_final_newline = true
12 | trim_trailing_whitespace = true
13 |
14 | [*.md]
15 | insert_final_newline = true
16 | trim_trailing_whitespace = false
17 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # prettier v2 dictates LF
2 | # https://prettier.io/docs/en/options.html#end-of-line
3 | * text=auto eol=lf
4 |
5 | .vscode/*.json linguist-language=jsonc
6 | tslint.json linguist-language=jsonc
7 | tsconfig.json linguist-language=jsonc
8 | tsconfig.*.json linguist-language=jsonc
9 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: [ManuelGil]
4 | ko_fi: ManuelGil
5 | custom:
6 | ['https://paypal.me/ManuelFGil', 'https://www.buymeacoffee.com/ManuelGil']
7 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .vscode-test/
2 | *.vsix
3 | compodoc/
4 | dist
5 | node_modules
6 | out
7 |
--------------------------------------------------------------------------------
/.husky/commit-msg:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 | . "$(dirname -- "$0")/_/husky.sh"
3 |
4 | npx --no -- commitlint --edit $1
5 |
--------------------------------------------------------------------------------
/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 | . "$(dirname -- "$0")/_/husky.sh"
3 |
4 | npx lint-staged
5 |
--------------------------------------------------------------------------------
/.lintstagedrc:
--------------------------------------------------------------------------------
1 | {
2 | "./**/*.ts": ["biome format --write", "biome lint --write", "git add ."]
3 | }
4 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | package-lock=false
2 |
--------------------------------------------------------------------------------
/.nvmrc:
--------------------------------------------------------------------------------
1 | v22.10.0
2 |
--------------------------------------------------------------------------------
/.vscode-test.mjs:
--------------------------------------------------------------------------------
1 | import { defineConfig } from '@vscode/test-cli';
2 |
3 | export default defineConfig({
4 | files: 'out/test/**/*.test.js',
5 | });
6 |
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | // See http://go.microsoft.com/fwlink/?LinkId=827846
3 | // for the documentation about the extensions.json format
4 | "recommendations": [
5 | "biomejs.biome"
6 | ]
7 | }
8 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | // A launch configuration that compiles the extension and then opens it inside a new window
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | {
6 | "version": "0.2.0",
7 | "configurations": [
8 | {
9 | "name": "Run Extension",
10 | "type": "extensionHost",
11 | "request": "launch",
12 | "args": [
13 | "--extensionDevelopmentPath=${workspaceFolder}"
14 | ],
15 | "outFiles": [
16 | "${workspaceFolder}/out/**/*.js"
17 | ],
18 | "preLaunchTask": "${defaultBuildTask}"
19 | },
20 | {
21 | "name": "Extension Tests",
22 | "type": "extensionHost",
23 | "request": "launch",
24 | "args": [
25 | "--extensionDevelopmentPath=${workspaceFolder}",
26 | "--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
27 | ],
28 | "outFiles": [
29 | "${workspaceFolder}/out/test/**/*.js"
30 | ],
31 | "preLaunchTask": "${defaultBuildTask}"
32 | }
33 | ]
34 | }
35 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | // Place your settings in this file to overwrite default and user settings.
2 | {
3 | "files.exclude": {
4 | "out": false // set this to true to hide the "out" folder with the compiled JS files
5 | },
6 | "search.exclude": {
7 | "out": true // set this to false to include "out" folder in search results
8 | },
9 | // Turn off tsc task auto detection since we have the necessary tasks as npm scripts
10 | "typescript.tsc.autoDetect": "off",
11 | "[typescript]": {
12 | "editor.defaultFormatter": "biomejs.biome"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/.vscode/tasks.json:
--------------------------------------------------------------------------------
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": "watch",
9 | "problemMatcher": "$tsc-watch",
10 | "isBackground": true,
11 | "presentation": {
12 | "reveal": "never"
13 | },
14 | "group": {
15 | "kind": "build",
16 | "isDefault": true
17 | }
18 | }
19 | ]
20 | }
21 |
--------------------------------------------------------------------------------
/.vscodeignore:
--------------------------------------------------------------------------------
1 | .husky/**
2 | .vscode/**
3 | .vscode-test/**
4 | out/test/**
5 | compodoc/**
6 | src/**
7 | .editorconfig
8 | .eslintignore
9 | .eslintrc.json
10 | .gitattributes
11 | .gitignore
12 | .lintstagedrc
13 | .prettierignore
14 | .prettierrc
15 | .yarnrc
16 | biome.json
17 | commitlint.config.js
18 | yarn.lock
19 | vsc-extension-quickstart.md
20 | **/tsconfig.json
21 | **/tsconfig.*.json
22 | **/.eslintrc.json
23 | **/*.map
24 | **/*.ts
25 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Change Log
2 |
3 | All notable changes to the "T3 Stack / NextJS / ReactJS File Generator for VSCode" extension will be documented in this file.
4 |
5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7 |
8 | ## [Unreleased]
9 |
10 | ## [2.6.0] - 2025-01-09
11 |
12 | ### Added
13 |
14 | - Add version extension check to show a message when the extension is outdated
15 | - Add `biome` linting and formatting tool to the project
16 | - Add `biome` configuration file to define the linting and formatting rules
17 | - Add VS Code test configuration and update test scripts
18 |
19 | ### Changed
20 |
21 | - Improve the welcome and update messages in the extension
22 | - Upgrade dependencies to the latest versions available
23 |
24 | ## [2.5.1] - 2024-11-07
25 |
26 | ### Fixed
27 |
28 | - Fix the `json2ts` and `json2zod` issues when the selection does not have a JSON strict format
29 |
30 | ## [2.5.0] - 2024-04-01
31 |
32 | ### Changed
33 |
34 | - Update the `Drizzle` snippets to integrate the new `Drizzle` functionality
35 | - Update the `cli-commands.md` file with the new `Drizzle` commands
36 | - Update the `README.md` file to improve the contribution guidelines
37 | - Upgrade dependencies to the latest versions available
38 |
39 | ## [2.4.0] - 2024-03-28
40 |
41 | ### Changed
42 |
43 | - Update the `getFiles` method in the `ListFilesController` so that it can be used without instantiating the class
44 | - Update the `ListFilesProvider` and `ListRoutesProvider` to use the new `getFiles` method
45 | - Upgrade dependencies to the latest versions available
46 |
47 | ## [2.3.0] - 2024-03-07
48 |
49 | ### Added
50 |
51 | - Add List of Hooks View
52 |
53 | ### Changed
54 |
55 | - Improve the route regex to match the routes in the file
56 |
57 | ## [2.2.0] - 2024-03-04
58 |
59 | ### Added
60 |
61 | - Add `Show Path In File Name` setting to show the path in the file name
62 |
63 | ## [2.1.0] - 2024-03-02
64 |
65 | ### Added
66 |
67 | - Add List of Components View
68 |
69 | ### Fixed
70 |
71 | - Fix issues with the file generation
72 |
73 | ## [2.0.0] - 2024-03-01
74 |
75 | ### Added
76 |
77 | - Add List of Files View
78 | - Add List of Routes View
79 | - Add Feedback View
80 | - Add file includes section to the settings
81 | - Add file excludes section to the settings
82 | - Add file to watch section to the settings
83 | - Add compodoc dependencies for the documentation generation
84 |
85 | ### Changed
86 |
87 | - Refactor the folder structure of the extension to improve the codebase
88 | - Improve the generation of the files to use the new folder structure
89 | - Upgrade dependencies to the latest versions available
90 | - Update settings to use the new folder structure
91 | - Improve the documentation of the extension
92 |
93 | ### Fixed
94 |
95 | - Fix issues related to the new folder structure
96 |
97 | ## [1.5.0] - 2024-01-22
98 |
99 | ### Added
100 |
101 | - Add new `Drizzle` snippets
102 |
103 | ## [1.4.0] - 2024-01-22
104 |
105 | ### Added
106 |
107 | - Add `Drizzle` snippets and commands
108 |
109 | ## [1.3.0] - 2024-01-14
110 |
111 | ### Added
112 |
113 | - Add convert `json` to `typescript` and `zod` object commands
114 |
115 | ### Changed
116 |
117 | - Improve file generation
118 |
119 | ## [1.2.0] - 2024-01-08
120 |
121 | ### Added
122 |
123 | - Add settings for experimental https function for NextJS server
124 |
125 | ## [1.1.1] - 2023-12-27
126 |
127 | ### Added
128 |
129 | - Add new documentation for Features, Commands, and Snippets
130 |
131 | ## [1.1.0] - 2023-12-26
132 |
133 | ### Added
134 |
135 | - Add settings for the default import alias for `tRPC` files
136 |
137 | ## [1.0.1] - 2023-12-24
138 |
139 | ### Changed
140 |
141 | - Update `README.md` file
142 |
143 | ## [1.0.0] - 2023-12-24
144 |
145 | ### Added
146 |
147 | - Add `NextAuth` commands for generating `[...nextauth].ts` file
148 | - Add `tRPC` commands for generating `Router` and `Controller` files
149 | - Add `NextAuth` snippets
150 | - Add `tRPC` snippets
151 | - Add `TailwindCSS` snippets
152 | - Add `i18next` snippets
153 | - Add `zod` snippets
154 | - Add configuration for showing the type in the name of the generated files (e.g. `index.component.tsx`)
155 | - Add new context menu for `NextAuth` and `tRPC` files, and `Prisma` commands
156 |
157 | ### Changed
158 |
159 | - Reorganize all project commands in a new `Project` category for better organization
160 | - Update Page and Layout commands removing the class name input and add a default value of `Page` and `Layout` respectively
161 | - Rename all commands from `Next` to `t3` to avoid conflicts with other extensions commands that use `Next` as a prefix
162 |
163 | ### Removed
164 |
165 | - Remove plain text scope from all snippets to avoid conflicts with `GitHub Copilot Chat` and other extensions
166 |
167 | ## [0.5.1] - 2023-12-19
168 |
169 | ### Fixed
170 |
171 | - Fix typos in `package.json`
172 |
173 | ## [0.5.0] - 2023-12-19
174 |
175 | ### Added
176 |
177 | - Add `JavaScript` snippets
178 | - Add `NextJS` commands
179 |
180 | ### Changed
181 |
182 | - Update `HTML` and `RectJS` snippets for better organization and readability of the code
183 |
184 | ### Fixed
185 |
186 | - Fix default extension name in `NextJS` commands
187 |
188 | ## [0.4.0] - 2023-12-17
189 |
190 | ### Added
191 |
192 | - Add `Prisma` commands for `model`, `migration`, and `seed` generation, and `studio` commands
193 | - Add `Prisma` snippets
194 |
195 | ### Changed
196 |
197 | - Update `ReactJS` Snippets
198 |
199 | ## [0.3.0] - 2023-12-16
200 |
201 | ### Added
202 |
203 | - Add `HTML` snippets
204 | - Add `ReactJS` snippets
205 |
206 | ## [0.2.0] - 2023-12-15
207 |
208 | ### Added
209 |
210 | - Add `Create App` commands for `T3 Stack`, `NextJS`, and `ReactJS` projects
211 |
212 | ## [0.1.0] - 2023-12-14
213 |
214 | - Initial release
215 |
216 | [unreleased]: https://github.com/ManuelGil/vscode-nextjs-generator/compare/v2.6.0...HEAD
217 | [2.6.0]: https://github.com/ManuelGil/vscode-nextjs-generator/compare/v2.5.1...v2.6.0
218 | [2.5.1]: https://github.com/ManuelGil/vscode-nextjs-generator/compare/v2.5.0...v2.5.1
219 | [2.5.0]: https://github.com/ManuelGil/vscode-nextjs-generator/compare/v2.4.0...v2.5.0
220 | [2.4.0]: https://github.com/ManuelGil/vscode-nextjs-generator/compare/v2.3.0...v2.4.0
221 | [2.3.0]: https://github.com/ManuelGil/vscode-nextjs-generator/compare/v2.2.0...v2.3.0
222 | [2.2.0]: https://github.com/ManuelGil/vscode-nextjs-generator/compare/v2.1.0...v2.2.0
223 | [2.1.0]: https://github.com/ManuelGil/vscode-nextjs-generator/compare/v2.0.0...v2.1.0
224 | [2.0.0]: https://github.com/ManuelGil/vscode-nextjs-generator/compare/v1.5.0...v2.0.0
225 | [1.5.0]: https://github.com/ManuelGil/vscode-nextjs-generator/compare/v1.4.0...v1.5.0
226 | [1.4.0]: https://github.com/ManuelGil/vscode-nextjs-generator/compare/v1.3.0...v1.4.0
227 | [1.3.0]: https://github.com/ManuelGil/vscode-nextjs-generator/compare/v1.2.0...v1.3.0
228 | [1.2.0]: https://github.com/ManuelGil/vscode-nextjs-generator/compare/v1.1.1...v1.2.0
229 | [1.1.1]: https://github.com/ManuelGil/vscode-nextjs-generator/compare/v1.1.0...v1.1.1
230 | [1.1.0]: https://github.com/ManuelGil/vscode-nextjs-generator/compare/v1.0.1...v1.1.0
231 | [1.0.1]: https://github.com/ManuelGil/vscode-nextjs-generator/compare/v1.0.0...v1.0.1
232 | [1.0.0]: https://github.com/ManuelGil/vscode-nextjs-generator/compare/v0.5.1...v1.0.0
233 | [0.5.1]: https://github.com/ManuelGil/vscode-nextjs-generator/compare/v0.5.0...v0.5.1
234 | [0.5.0]: https://github.com/ManuelGil/vscode-nextjs-generator/compare/v0.4.0...v0.5.0
235 | [0.4.0]: https://github.com/ManuelGil/vscode-nextjs-generator/compare/v0.3.0...v0.4.0
236 | [0.3.0]: https://github.com/ManuelGil/vscode-nextjs-generator/compare/v0.2.0...v0.3.0
237 | [0.2.0]: https://github.com/ManuelGil/vscode-nextjs-generator/compare/v0.1.0...v0.2.0
238 | [0.1.0]: https://github.com/ManuelGil/vscode-nextjs-generator/releases/tag/v0.1.0
239 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | We as members, contributors, and leaders pledge to make participation in our
6 | community a harassment-free experience for everyone, regardless of age, body
7 | size, visible or invisible disability, ethnicity, sex characteristics, gender
8 | identity and expression, level of experience, education, socio-economic status,
9 | nationality, personal appearance, race, caste, color, religion, or sexual
10 | identity and orientation.
11 |
12 | We pledge to act and interact in ways that contribute to an open, welcoming,
13 | diverse, inclusive, and healthy community.
14 |
15 | ## Our Standards
16 |
17 | Examples of behavior that contributes to a positive environment for our
18 | community include:
19 |
20 | - Demonstrating empathy and kindness toward other people
21 | - Being respectful of differing opinions, viewpoints, and experiences
22 | - Giving and gracefully accepting constructive feedback
23 | - Accepting responsibility and apologizing to those affected by our mistakes,
24 | and learning from the experience
25 | - Focusing on what is best not just for us as individuals, but for the overall
26 | community
27 |
28 | Examples of unacceptable behavior include:
29 |
30 | - The use of sexualized language or imagery, and sexual attention or advances of
31 | any kind
32 | - Trolling, insulting or derogatory comments, and personal or political attacks
33 | - Public or private harassment
34 | - Publishing others' private information, such as a physical or email address,
35 | without their explicit permission
36 | - Other conduct which could reasonably be considered inappropriate in a
37 | professional setting
38 |
39 | ## Enforcement Responsibilities
40 |
41 | Community leaders are responsible for clarifying and enforcing our standards of
42 | acceptable behavior and will take appropriate and fair corrective action in
43 | response to any behavior that they deem inappropriate, threatening, offensive,
44 | or harmful.
45 |
46 | Community leaders have the right and responsibility to remove, edit, or reject
47 | comments, commits, code, wiki edits, issues, and other contributions that are
48 | not aligned to this Code of Conduct, and will communicate reasons for moderation
49 | decisions when appropriate.
50 |
51 | ## Scope
52 |
53 | This Code of Conduct applies within all community spaces, and also applies when
54 | an individual is officially representing the community in public spaces.
55 | Examples of representing our community include using an official e-mail address,
56 | posting via an official social media account, or acting as an appointed
57 | representative at an online or offline event.
58 |
59 | ## Enforcement
60 |
61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
62 | reported to the community leaders responsible for enforcement at
63 | [INSERT CONTACT METHOD].
64 | All complaints will be reviewed and investigated promptly and fairly.
65 |
66 | All community leaders are obligated to respect the privacy and security of the
67 | reporter of any incident.
68 |
69 | ## Enforcement Guidelines
70 |
71 | Community leaders will follow these Community Impact Guidelines in determining
72 | the consequences for any action they deem in violation of this Code of Conduct:
73 |
74 | ### 1. Correction
75 |
76 | **Community Impact**: Use of inappropriate language or other behavior deemed
77 | unprofessional or unwelcome in the community.
78 |
79 | **Consequence**: A private, written warning from community leaders, providing
80 | clarity around the nature of the violation and an explanation of why the
81 | behavior was inappropriate. A public apology may be requested.
82 |
83 | ### 2. Warning
84 |
85 | **Community Impact**: A violation through a single incident or series of
86 | actions.
87 |
88 | **Consequence**: A warning with consequences for continued behavior. No
89 | interaction with the people involved, including unsolicited interaction with
90 | those enforcing the Code of Conduct, for a specified period of time. This
91 | includes avoiding interactions in community spaces as well as external channels
92 | like social media. Violating these terms may lead to a temporary or permanent
93 | ban.
94 |
95 | ### 3. Temporary Ban
96 |
97 | **Community Impact**: A serious violation of community standards, including
98 | sustained inappropriate behavior.
99 |
100 | **Consequence**: A temporary ban from any sort of interaction or public
101 | communication with the community for a specified period of time. No public or
102 | private interaction with the people involved, including unsolicited interaction
103 | with those enforcing the Code of Conduct, is allowed during this period.
104 | Violating these terms may lead to a permanent ban.
105 |
106 | ### 4. Permanent Ban
107 |
108 | **Community Impact**: Demonstrating a pattern of violation of community
109 | standards, including sustained inappropriate behavior, harassment of an
110 | individual, or aggression toward or disparagement of classes of individuals.
111 |
112 | **Consequence**: A permanent ban from any sort of public interaction within the
113 | community.
114 |
115 | ## Attribution
116 |
117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118 | version 2.1, available at
119 | [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120 |
121 | Community Impact Guidelines were inspired by
122 | [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123 |
124 | For answers to common questions about this code of conduct, see the FAQ at
125 | [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126 | [https://www.contributor-covenant.org/translations][translations].
127 |
128 | [homepage]: https://www.contributor-covenant.org
129 | [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130 | [Mozilla CoC]: https://github.com/mozilla/diversity
131 | [FAQ]: https://www.contributor-covenant.org/faq
132 | [translations]: https://www.contributor-covenant.org/translations
133 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | When contributing to this repository, please first discuss the change you wish to make via issue,
4 | email, or any other method with the owners of this repository before making a change.
5 |
6 | Please note we have a code of conduct, please follow it in all your interactions with the project.
7 |
8 | ## Pull Request Process
9 |
10 | 1. Ensure any install or build dependencies are removed before the end of the layer when doing a
11 | build.
12 | 2. Update the README.md with details of changes to the interface, this includes new environment
13 | variables, exposed ports, useful file locations and container parameters.
14 | 3. Increase the version numbers in any examples files and the README.md to the new version that this
15 | Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
16 | 4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
17 | do not have permission to do that, you may request the second reviewer to merge it for you.
18 |
19 | ## Code of Conduct
20 |
21 | ### Our Pledge
22 |
23 | In the interest of fostering an open and welcoming environment, we as
24 | contributors and maintainers pledge to making participation in our project and
25 | our community a harassment-free experience for everyone, regardless of age, body
26 | size, disability, ethnicity, gender identity and expression, level of experience,
27 | nationality, personal appearance, race, religion, or sexual identity and
28 | orientation.
29 |
30 | ### Our Standards
31 |
32 | Examples of behavior that contributes to creating a positive environment
33 | include:
34 |
35 | - Using welcoming and inclusive language
36 | - Being respectful of differing viewpoints and experiences
37 | - Gracefully accepting constructive criticism
38 | - Focusing on what is best for the community
39 | - Showing empathy towards other community members
40 |
41 | Examples of unacceptable behavior by participants include:
42 |
43 | - The use of sexualized language or imagery and unwelcome sexual attention or
44 | advances
45 | - Trolling, insulting/derogatory comments, and personal or political attacks
46 | - Public or private harassment
47 | - Publishing others' private information, such as a physical or electronic
48 | address, without explicit permission
49 | - Other conduct which could reasonably be considered inappropriate in a
50 | professional setting
51 |
52 | ### Our Responsibilities
53 |
54 | Project maintainers are responsible for clarifying the standards of acceptable
55 | behavior and are expected to take appropriate and fair corrective action in
56 | response to any instances of unacceptable behavior.
57 |
58 | Project maintainers have the right and responsibility to remove, edit, or
59 | reject comments, commits, code, wiki edits, issues, and other contributions
60 | that are not aligned to this Code of Conduct, or to ban temporarily or
61 | permanently any contributor for other behaviors that they deem inappropriate,
62 | threatening, offensive, or harmful.
63 |
64 | ### Scope
65 |
66 | This Code of Conduct applies both within project spaces and in public spaces
67 | when an individual is representing the project or its community. Examples of
68 | representing a project or community include using an official project e-mail
69 | address, posting via an official social media account, or acting as an appointed
70 | representative at an online or offline event. Representation of a project may be
71 | further defined and clarified by project maintainers.
72 |
73 | ### Enforcement
74 |
75 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
76 | reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
77 | complaints will be reviewed and investigated and will result in a response that
78 | is deemed necessary and appropriate to the circumstances. The project team is
79 | obligated to maintain confidentiality with regard to the reporter of an incident.
80 | Further details of specific enforcement policies may be posted separately.
81 |
82 | Project maintainers who do not follow or enforce the Code of Conduct in good
83 | faith may face temporary or permanent repercussions as determined by other
84 | members of the project's leadership.
85 |
86 | ### Attribution
87 |
88 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
89 | available at [http://contributor-covenant.org/version/1/4][version]
90 |
91 | [homepage]: http://contributor-covenant.org
92 | [version]: http://contributor-covenant.org/version/1/4/
93 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Manuel Gil
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.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # T3 Stack / NextJS / ReactJS File Generator
2 |
3 | [](https://marketplace.visualstudio.com/items?itemName=imgildev.vscode-nextjs-generator)
4 | [](https://marketplace.visualstudio.com/items?itemName=imgildev.vscode-nextjs-generator)
5 | [](https://marketplace.visualstudio.com/items?itemName=imgildev.vscode-nextjs-generator)
6 | [](https://marketplace.visualstudio.com/items?itemName=imgildev.vscode-nextjs-generator&ssr=false#review-details)
7 | [](https://github.com/ManuelGil/vscode-nextjs-generator)
8 | [](https://github.com/ManuelGil/vscode-nextjs-generator/blob/main/LICENSE)
9 |
10 |
11 |
12 |
13 |
14 | Elevate your development workflow with our cutting-edge extension tailored for NextJS 14 (compatibility for version 13). Designed as the quintessential development companion, this toolset redefines file generation, optimizing every phase of your project's lifecycle. Seamlessly create pages, components, layouts, and more—all meticulously crafted to align with the esteemed T3 Stack paradigm. Leverage the capabilities of advanced technologies like NextJS, ReactJS, Prisma, Drizzle, TailwindCSS, i18next, Zod, and numerous other essential frameworks.
15 |
16 | 
17 |
18 | Ready to transcend your development experience?
19 |
20 | Boost your efficiency with this VSCode extension, designed to streamline file generation for your T3 Stack project. Whether crafting individual components or kickstarting a new venture, the extension simplifies tasks through intuitive commands. Additionally, initiate your NextJS server effortlessly, enabling swift previews of your application.
21 |
22 | 
23 |
24 | ## Index
25 |
26 | - [T3 Stack / NextJS / ReactJS File Generator](#t3-stack--nextjs--reactjs-file-generator)
27 | - [Index](#index)
28 | - [Requirements](#requirements)
29 | - [Create a New Project](#create-a-new-project)
30 | - [Project Settings](#project-settings)
31 | - [Features](#features)
32 | - [Commands to Create Files](#commands-to-create-files)
33 | - [Terminal Commands](#terminal-commands)
34 | - [Snippets](#snippets)
35 | - [Context Menu](#context-menu)
36 | - [Follow Me](#follow-me)
37 | - [VSXpert Template](#vsxpert-template)
38 | - [Other Extensions](#other-extensions)
39 | - [Contributing](#contributing)
40 | - [Code of Conduct](#code-of-conduct)
41 | - [Changelog](#changelog)
42 | - [Authors](#authors)
43 | - [License](#license)
44 |
45 | ## Requirements
46 |
47 | - VSCode 1.90.0 or later
48 |
49 | ## Create a New Project
50 |
51 | You can create a new project using the T3 Stack / NextJS / Vite CLI. To do so, open the command palette in VSCode:
52 |
53 | - `CTRL + SHIFT + P` (Windows)
54 | - `CMD + SHIFT + P` (Mac OS)
55 |
56 | Type `T3: Create Project` and press `ENTER`.
57 |
58 | 
59 |
60 | ## Project Settings
61 |
62 | Configure your project by creating or updating a settings.json file at the project's root. If you already have a `.vscode/settings.json` file, skip the first two steps.
63 |
64 | 1. Open the command palette in VSCode:
65 |
66 | - `CTRL + SHIFT + P` (Windows)
67 | - `CMD + SHIFT + P` (Mac OS)
68 |
69 | 2. Type `Preferences: Open Workspace Settings (JSON)`.
70 |
71 | 3. In the `.vscode/settings.json` file, copy and paste the following settings:
72 |
73 | ```jsonc
74 | {
75 | "nextjs.files.alias": "~", // The import alias for the files to be created. Example: "~", "@", "#", etc
76 | "nextjs.files.extension": "tsx", // The extension of the files to be created. Example: "tsx"
77 | "nextjs.files.showType": true, // Show the type of the file in the file name. Example: "home.component.tsx"
78 | "nextjs.files.include": [
79 | "js",
80 | "jsx",
81 | "ts",
82 | "tsx"
83 | ], // The file extensions to watch for changes. Example: "js", "jsx", "ts", "tsx"
84 | "nextjs.files.exclude": [
85 | "**/node_modules/**",
86 | "**/dist/**",
87 | "**/out/**",
88 | "**/build/**",
89 | "**/.*/**"
90 | ], // The files to exclude from watching. Example: "**/node_modules/**", "**/dist/**", "**/out/**", "**/build/**", "**/.*/**"
91 | "nextjs.files.watch": [
92 | "controllers",
93 | "components",
94 | "routers"
95 | ], // The types of files to watch for changes. Example: "controllers", "components", "routers"
96 | "nextjs.files.showPath": true, // Show the path of the file in the file name. Example: "home.component.tsx (pages/home)"
97 | "nextjs.server.turbo": true, // Enable Turbo Mode for NextJS server (Only for NextJS 14 or later)
98 | "nextjs.server.experimentalHttps": true, // Enable HTTPS for the NextJS server (Only for NextJS 14 or later)
99 | }
100 | ```
101 |
102 | 4. **Restart VS Code**
103 |
104 | Your project is now set up to automatically format code upon saving.
105 |
106 | ## Features
107 |
108 | ### Commands to Create Files
109 |
110 | See the following documentation about [how to create files](./docs/generate-files.md) for more information.
111 |
112 | ### Terminal Commands
113 |
114 | See the following documentation about [how to use the terminal commands](./docs/cli-commands.md) for more information.
115 |
116 | ### Snippets
117 |
118 | See the following documentation about [how to use the snippets](./docs/snippets.md) for more information.
119 |
120 | ### Context Menu
121 |
122 | See the following documentation about [how to use the context menu](./docs/context-menu.md) for more information.
123 |
124 | ## Follow Me
125 |
126 | If you enjoy using this extension, consider following me for updates on this and future projects:
127 |
128 | [](https://github.com/ManuelGil)
129 | [](https://twitter.com/imgildev)
130 |
131 | ## VSXpert Template
132 |
133 | This extension was created using [VSXpert](https://vsxpert.com), a template that helps you create Visual Studio Code extensions with ease. VSXpert provides a simple and easy-to-use structure to get you started quickly.
134 |
135 | ## Other Extensions
136 |
137 | - [Angular File Generator](https://marketplace.visualstudio.com/items?itemName=imgildev.vscode-angular-generator)
138 | - [NestJS File Generator](https://marketplace.visualstudio.com/items?itemName=imgildev.vscode-nestjs-generator)
139 | - [T3 Stack / NextJS / ReactJS File Generator](https://marketplace.visualstudio.com/items?itemName=imgildev.vscode-nextjs-generator)
140 | - [Auto Barrel](https://marketplace.visualstudio.com/items?itemName=imgildev.vscode-auto-barrel)
141 | - [CodeIgniter 4 Spark](https://marketplace.visualstudio.com/items?itemName=imgildev.vscode-codeigniter4-spark)
142 |
143 | ## Contributing
144 |
145 | T3 Stack / NextJS / ReactJS File Generator for VSCode is open-source software, and we welcome contributions from the community. If you'd like to contribute, please fork the [GitHub repository](https://github.com/ManuelGil/vscode-nextjs-generator) and submit a pull request with your changes.
146 |
147 | Before contributing, please read our [Contribution Guidelines](./CONTRIBUTING.md) for instructions on coding standards, testing, and more.
148 |
149 | ## Code of Conduct
150 |
151 | We are committed to providing a friendly, safe, and welcoming environment for all, regardless of gender, sexual orientation, disability, ethnicity, religion, or similar personal characteristic. Please review our [Code of Conduct](./CODE_OF_CONDUCT.md) before participating in our community.
152 |
153 | ## Changelog
154 |
155 | For a complete list of changes, see the [CHANGELOG.md](./CHANGELOG.md)
156 |
157 | ## Authors
158 |
159 | - **Manuel Gil** - _Owner_ - [ManuelGil](https://github.com/ManuelGil)
160 |
161 | See also the list of [contributors](https://github.com/ManuelGil/vscode-nextjs-generator/contributors) who participated in this project.
162 |
163 | ## License
164 |
165 | T3 Stack / NextJS / ReactJS File Generator for VSCode is licensed under the MIT License - see the [MIT License](https://opensource.org/licenses/MIT) for details.
166 |
--------------------------------------------------------------------------------
/biome.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3 | "vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false },
4 | "files": { "include": ["src/**/*.ts"], "ignoreUnknown": false, "ignore": [] },
5 | "formatter": {
6 | "enabled": true,
7 | "useEditorconfig": true,
8 | "formatWithErrors": false,
9 | "indentStyle": "space",
10 | "indentWidth": 2,
11 | "lineEnding": "lf",
12 | "lineWidth": 80,
13 | "attributePosition": "auto",
14 | "bracketSpacing": true,
15 | "ignore": [
16 | "./.vscode",
17 | "./compodoc",
18 | "./coverage",
19 | "./docs",
20 | "./node_modules",
21 | "./out"
22 | ]
23 | },
24 | "organizeImports": { "enabled": true },
25 | "linter": {
26 | "enabled": true,
27 | "rules": {
28 | "recommended": false,
29 | "style": {
30 | "useBlockStatements": "warn",
31 | "useNamingConvention": {
32 | "level": "warn",
33 | "options": { "strictCase": false }
34 | },
35 | "useThrowOnlyError": "warn"
36 | },
37 | "suspicious": { "noDoubleEquals": "warn" }
38 | },
39 | "ignore": [
40 | "**/out",
41 | "**/*.d.ts",
42 | "**/.vscode/",
43 | "**/compodoc/",
44 | "**/coverage/",
45 | "**/docs/",
46 | "**/node_modules/",
47 | "**/out/",
48 | "**/commitlint.config.js"
49 | ]
50 | },
51 | "javascript": {
52 | "formatter": {
53 | "jsxQuoteStyle": "double",
54 | "quoteProperties": "preserve",
55 | "trailingCommas": "all",
56 | "semicolons": "always",
57 | "arrowParentheses": "always",
58 | "bracketSameLine": false,
59 | "quoteStyle": "single",
60 | "attributePosition": "auto",
61 | "bracketSpacing": true
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/commitlint.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | extends: ['@commitlint/config-conventional'],
3 | };
4 |
--------------------------------------------------------------------------------
/docs/cli-commands.md:
--------------------------------------------------------------------------------
1 | # How to use the terminal commands
2 |
3 | ## Index
4 |
5 | - [How to use the terminal commands](#how-to-use-the-terminal-commands)
6 | - [Index](#index)
7 | - [Commands](#commands)
8 | - [Usage](#usage)
9 | - [Settings](#settings)
10 |
11 | ## Commands
12 |
13 | | Title | Purpose |
14 | | ------------------------- | ---------------------------------------------------------------------------- |
15 | | T3: Create Project | Creates a new project using the T3 Stack / NextJS / Vite CLI |
16 | | T3: Prisma DB Execute | Execute native commands to your database |
17 | | T3: Prisma DB Pull | Pull the state from the database to the Prisma schema using introspection |
18 | | T3: Prisma DB Push | Push the state from your Prisma schema to your database |
19 | | T3: Prisma DB Seed | Seed your database |
20 | | T3: Prisma Format | Format a Prisma schema |
21 | | T3: Prisma Generate | Generate artifacts |
22 | | T3: Prisma Init | Set up a new Prisma project |
23 | | T3: Prisma Migrate Deploy | Apply pending migrations to update the database schema in production/staging |
24 | | T3: Prisma Migrate Dev | Create a migration from changes in Prisma schema |
25 | | T3: Prisma Migrate Reset | Reset your database and apply all migrations, all data will be lost |
26 | | T3: Prisma Migrate Status | Check the status of your database migrations |
27 | | T3: Prisma Studio | Browse your data with Prisma Studio |
28 | | T3: Prisma Validate | Validate a Prisma schema |
29 | | T3: Drizzle Generate | Generate migrations based on you Drizzle schema |
30 | | T3: Drizzle Pull | Pull DDL from existing database |
31 | | T3: Drizzle Push | Push your schema changes directly to the database |
32 | | T3: Drizzle Drop | Delete previously generated migrations from migrations folder |
33 | | T3: Drizzle Up | Utility command to keep all metadata up to date |
34 | | T3: Drizzle Check | It's a very powerful tool for you to check consistency of your migrations |
35 | | T3: Drizzle Studio | Launch Drizzle Studio database browser locally from you config file |
36 | | T3: Start Server | Builds and serves your application, rebuilding on file changes |
37 |
38 | ## Usage
39 |
40 | 
41 |
42 | 
43 |
44 | ## Settings
45 |
46 | In the `.vscode/settings.json` file, copy and paste the following settings:
47 |
48 | ```jsonc
49 | {
50 | "nextjs.server.turbo": true,
51 | "nextjs.server.experimentalHttps": true,
52 | }
53 | ```
54 |
55 | - `nextjs.server.turbo`: Turbo mode is a new mode that enables incremental compilation and dramatically improves the startup time of Next.js development servers. It's only available in Next.js 14 or newer.
56 | - `nextjs.server.experimentalHttps`: Enable HTTPS for the NextJS server. This is an experimental feature and it's only available in Next.js 14 or newer. You can read more about it [here](https://nextjs.org/docs/pages/api-reference/next-cli#https-for-local-development).
57 |
--------------------------------------------------------------------------------
/docs/context-menu.md:
--------------------------------------------------------------------------------
1 | # How to use the snippets
2 |
3 | ## Index
4 |
5 | - [How to use the snippets](#how-to-use-the-snippets)
6 | - [Index](#index)
7 | - [Commands](#commands)
8 | - [Usage](#usage)
9 |
10 | ## Commands
11 |
12 | | Title | Purpose |
13 | | -------------------------- | ------------------------------------------------ |
14 | | Convert JSON to TypeScript | Create a TypeScript interface from a JSON object |
15 | | Convert JSON to Zod | Create a Zod schema from a JSON object |
16 |
17 | ## Usage
18 |
19 | 
20 |
--------------------------------------------------------------------------------
/docs/generate-files.md:
--------------------------------------------------------------------------------
1 | # How to create files
2 |
3 | ## Index
4 |
5 | - [How to create files](#how-to-create-files)
6 | - [Index](#index)
7 | - [Commands](#commands)
8 | - [Usage](#usage)
9 | - [Settings](#settings)
10 |
11 | ## Commands
12 |
13 | | Title | Purpose |
14 | | ------------------------------- | ---------------------------------------------------- |
15 | | T3: Generate Class or Interface | Creates a new, generic class or interface definition |
16 | | T3: Generate Component | Creates a new, generic component |
17 | | T3: Generate Layout | Creates a new, generic layout |
18 | | T3: Generate Loading | Creates a new, generic loading component |
19 | | T3: Generate Page | Creates a new, generic page |
20 | | T3: Add NextAuth file | Adds a new file called [...nextauth].ts |
21 | | T3: Generate tRPC Router | Creates a new, generic tRPC router |
22 | | T3: Generate tRPC Controller | Creates a new, generic tRPC controller |
23 |
24 | ## Usage
25 |
26 | 
27 |
28 | 
29 |
30 | ## Settings
31 |
32 | In the `.vscode/settings.json` file, copy and paste the following settings:
33 |
34 | ```jsonc
35 | {
36 | "nextjs.files.alias": "~",
37 | "nextjs.files.extension": "tsx",
38 | "nextjs.files.showType": true,
39 | "nextjs.files.include": [
40 | "js",
41 | "jsx",
42 | "ts",
43 | "tsx"
44 | ], // The file extensions to watch for changes. Example: "js", "jsx", "ts", "tsx"
45 | "nextjs.files.exclude": [
46 | "**/node_modules/**",
47 | "**/dist/**",
48 | "**/out/**",
49 | "**/build/**",
50 | "**/.*/**"
51 | ], // The files to exclude from watching. Example: "**/node_modules/**", "**/dist/**", "**/out/**", "**/build/**", "**/.*/**"
52 | "nextjs.files.watch": [
53 | "controllers",
54 | "components",
55 | "routers"
56 | ], // The types of files to watch for changes. Example: "controllers", "components", "routers"
57 | "nextjs.files.showPath": true, // Show the path of the file in the file name. Example: "home.component.tsx (pages/home)"
58 | }
59 | ```
60 |
61 | - `nextjs.files.alias`: The alias to use for the import statement. For example, if you use `~` as an alias, the import statement will look like this: `import { Component } from '~/components'`
62 | - `nextjs.files.extension`: The extension to use for the file. For example, if you use `tsx` as an extension, the file will be created as `component.tsx`
63 | - `nextjs.files.showType`: Whether to show the type of the component. For example, if you use `true` as a value, the file will be created as `home.component.tsx` and if you use `false` as a value, the file will be created as `home.ts`
64 | - `nextjs.files.include`: The file extensions to watch for changes. For example, if you use `ts` and `tsx` as extensions, the extension will watch for changes in `.ts` and `.tsx` files
65 | - `nextjs.files.exclude`: The files to exclude from watching. For example, if you use `**/node_modules/**` and `**/dist/**` as exclusions, the extension will not watch for changes in the `node_modules` and `dist` folders
66 | - `nextjs.files.watch`: The types of files to watch for changes. For example, if you use `components` and `routers` as types, the extension will watch for changes with the `component` and `router` type in the file name. For example, `home.component.tsx` and `home.router.tsx`
67 | - `nextjs.files.showPath`: Whether to show the path of the file in the file name. For example, if you use `true` as a value, the file will be created as `home.component.tsx (pages/home)` and if you use `false` as a value, the file will be created as `home.component.tsx`
68 |
--------------------------------------------------------------------------------
/docs/images/commands.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ManuelGil/vscode-nextjs-generator/f768bc0218dced2cff3ca7e0521fc68104b4a6f0/docs/images/commands.png
--------------------------------------------------------------------------------
/docs/images/create-project.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ManuelGil/vscode-nextjs-generator/f768bc0218dced2cff3ca7e0521fc68104b4a6f0/docs/images/create-project.gif
--------------------------------------------------------------------------------
/docs/images/demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ManuelGil/vscode-nextjs-generator/f768bc0218dced2cff3ca7e0521fc68104b4a6f0/docs/images/demo.gif
--------------------------------------------------------------------------------
/docs/images/json.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ManuelGil/vscode-nextjs-generator/f768bc0218dced2cff3ca7e0521fc68104b4a6f0/docs/images/json.gif
--------------------------------------------------------------------------------
/docs/images/menu-general.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ManuelGil/vscode-nextjs-generator/f768bc0218dced2cff3ca7e0521fc68104b4a6f0/docs/images/menu-general.png
--------------------------------------------------------------------------------
/docs/images/menu-prisma.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ManuelGil/vscode-nextjs-generator/f768bc0218dced2cff3ca7e0521fc68104b4a6f0/docs/images/menu-prisma.png
--------------------------------------------------------------------------------
/docs/images/preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ManuelGil/vscode-nextjs-generator/f768bc0218dced2cff3ca7e0521fc68104b4a6f0/docs/images/preview.png
--------------------------------------------------------------------------------
/docs/images/settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ManuelGil/vscode-nextjs-generator/f768bc0218dced2cff3ca7e0521fc68104b4a6f0/docs/images/settings.png
--------------------------------------------------------------------------------
/docs/images/snippets.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ManuelGil/vscode-nextjs-generator/f768bc0218dced2cff3ca7e0521fc68104b4a6f0/docs/images/snippets.png
--------------------------------------------------------------------------------
/docs/images/workspace-settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ManuelGil/vscode-nextjs-generator/f768bc0218dced2cff3ca7e0521fc68104b4a6f0/docs/images/workspace-settings.png
--------------------------------------------------------------------------------
/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ManuelGil/vscode-nextjs-generator/f768bc0218dced2cff3ca7e0521fc68104b4a6f0/icon.png
--------------------------------------------------------------------------------
/schemas/config.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json-schema.org/draft-07/schema#",
3 | "type": "object",
4 | "properties": {
5 | "nextjs.files.alias": {
6 | "type": "string",
7 | "default": "~",
8 | "scope": "resource",
9 | "description": "Sets the default import alias for the generated files"
10 | },
11 | "nextjs.files.extension": {
12 | "type": "string",
13 | "default": "tsx",
14 | "enum": [
15 | "js",
16 | "jsx",
17 | "ts",
18 | "tsx"
19 | ],
20 | "scope": "resource",
21 | "description": "Sets the default extension for the generated files"
22 | },
23 | "nextjs.files.showType": {
24 | "type": "boolean",
25 | "default": true,
26 | "scope": "resource",
27 | "description": "Show the type in the name of the generated files"
28 | },
29 | "nextjs.files.include": {
30 | "type": "array",
31 | "default": [
32 | "js",
33 | "jsx",
34 | "ts",
35 | "tsx"
36 | ],
37 | "scope": "resource",
38 | "description": "Glob patterns to include in the package. The default is js, jsx, ts, and tsx."
39 | },
40 | "nextjs.files.exclude": {
41 | "type": "array",
42 | "default": [
43 | "**/node_modules/**",
44 | "**/dist/**",
45 | "**/out/**",
46 | "**/build/**",
47 | "**/.*/**"
48 | ],
49 | "scope": "resource",
50 | "description": "Glob patterns to exclude from the package. The default is node_modules, dist, out, build, and any hidden files."
51 | },
52 | "nextjs.files.watch": {
53 | "type": "array",
54 | "default": [
55 | "controllers",
56 | "components",
57 | "routers"
58 | ],
59 | "scope": "resource",
60 | "description": "The list of directories to watch for changes"
61 | },
62 | "nextjs.files.showPath": {
63 | "type": "boolean",
64 | "default": true,
65 | "scope": "resource",
66 | "description": "Show the path of the file in the name of the list of generated files"
67 | },
68 | "nextjs.server.turbo": {
69 | "type": "boolean",
70 | "default": true,
71 | "scope": "resource",
72 | "description": "Star server in turbo mode (only for NextJS 14+)"
73 | },
74 | "nextjs.server.experimentalHttps": {
75 | "type": "boolean",
76 | "default": false,
77 | "scope": "resource",
78 | "description": "Start server in https mode. Use `--experimental-https` flag (only for NextJS 14+)"
79 | }
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/snippets/i18next.code-snippets:
--------------------------------------------------------------------------------
1 | {
2 | "Trans": {
3 | "prefix": ["i18next_trans", "", "\t$0", ""]
6 | },
7 | "useTranslation": {
8 | "prefix": ["i18next_use_translation", "useTranslation"],
9 | "scope": "javascript,javascriptreact,typescript,typescriptreact",
10 | "body": ["const { t } = useTranslation();"]
11 | },
12 | "LanguageDetector": {
13 | "prefix": ["i18next_language_detector", "LanguageDetector"],
14 | "scope": "javascript,javascriptreact,typescript,typescriptreact",
15 | "body": [
16 | "import i18next from 'i18next';",
17 | "import LanguageDetector from 'i18next-browser-languagedetector';",
18 | "",
19 | "i18next.use(LanguageDetector).init({",
20 | "\t// detection: options,",
21 | "});"
22 | ]
23 | },
24 | "i18nextMiddleware": {
25 | "prefix": ["i18next_middleware", "i18nextMiddleware"],
26 | "scope": "javascript,javascriptreact,typescript,typescriptreact",
27 | "body": [
28 | "import i18next from 'i18next'",
29 | "import Backend from 'i18next-fs-backend'",
30 | "import i18nextMiddleware from 'i18next-http-middleware'",
31 | "",
32 | "i18next",
33 | "\t.use(i18nextMiddleware.LanguageDetector)",
34 | "\t.use(Backend)",
35 | "\t.init({",
36 | "\t\tinitImmediate: false,",
37 | "\t\tfallbackLng: 'en',",
38 | "\t\tpreload: ['en'],",
39 | "\t\tbackend: {",
40 | "\t\t\tloadPath: __dirname + '/resources/locales/{{lng}}/{{ns}}.json'",
41 | "\t\t}",
42 | "\t})",
43 | ""
44 | ]
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/snippets/nextjs.code-snippets:
--------------------------------------------------------------------------------
1 | {
2 | "Image Component": {
3 | "prefix": ["next_image", ""
6 | },
7 | "Link Component": {
8 | "prefix": ["next_link", "$2"
11 | },
12 | "Page Component with Props and Params": {
13 | "prefix": [
14 | "next_page_props_params",
15 | "Page Component with Props and Params"
16 | ],
17 | "scope": "javascript,javascriptreact,typescript,typescriptreact",
18 | "body": [
19 | "type ${1:name}Props = {",
20 | "\tparams: {",
21 | "\t\t${2:paramName}: string;",
22 | "\t}",
23 | "};",
24 | "",
25 | "export default function ${1:name}Page({",
26 | "\tparams",
27 | "} : ${1:name}Props) {",
28 | "\tconst { ${2:paramName} } = params;",
29 | "\treturn (",
30 | "\t\t${3: