crear-vite v1.0.6
crear-vite
crear-vite
A command-line tool to quickly scaffold a new Vite project with React setup. This utility automates the process of creating a Vite project, setting up a symbolic link to global node modules (if needed), and launching the development server.
Installation
To install the tool globally, run the following command:
npm install -g crear-vite
Usage
After installing the tool globally, you can use it to create a new Vite project with React.
Create a new Vite project
Run the following command to create a new Vite project in a folder of your choice:
crear-vite <project-name>
Replace <project-name>
with the desired name for your project. This will:
- Create a new directory with the provided name.
- Initialize a new Vite project with the React template.
- Set up a symbolic link to global
node_modules
(if needed). - Open the project in VS Code (if installed).
- Start the development server automatically.
For example:
crear-vite my-react-project
This will create a new Vite project called my-react-project
in your current directory and set everything up for you.
Commands Overview:
- Create project:
crear-vite <project-name>
Start development server: The development server starts automatically once the project is created. You can also manually start it with:
npm run dev
Open project in VS Code: After creating the project, the script will attempt to open the project in VS Code. If you don't have VS Code installed, you can manually open the project.
Prerequisites
Make sure you have the following installed:
- Node.js: Download Node.js
- npm (comes with Node.js)
License
This project is licensed under the ISC License.
Troubleshooting
If you encounter issues, try the following:
- Ensure that you have Node.js and npm installed.
- Ensure you're logged into npm if you're having trouble with permissions when publishing or installing the package.
Una herramienta de línea de comandos para crear rápidamente un nuevo proyecto Vite con la configuración de React. Esta utilidad automatiza el proceso de creación de un proyecto Vite, configura un enlace simbólico a los módulos node globales (si es necesario) y lanza el servidor de desarrollo.
Instalación
Para instalar la herramienta globalmente, ejecuta el siguiente comando:
npm install -g crear-vite
Uso
Una vez que hayas instalado la herramienta globalmente, puedes usarla para crear un nuevo proyecto Vite con React.
Crear un nuevo proyecto Vite
Ejecuta el siguiente comando para crear un nuevo proyecto Vite en la carpeta que elijas:
crear-vite <nombre-del-proyecto>
Reemplaza <nombre-del-proyecto>
con el nombre deseado para tu proyecto. Esto hará lo siguiente:
- Creará un nuevo directorio con el nombre proporcionado.
- Inicializará un nuevo proyecto Vite con la plantilla de React.
- Configurará un enlace simbólico a los módulos
node_modules
globales (si es necesario). - Abrirá el proyecto en VS Code (si está instalado).
- Iniciará automáticamente el servidor de desarrollo.
Por ejemplo:
crear-vite mi-proyecto-react
Esto creará un nuevo proyecto Vite llamado mi-proyecto-react
en tu directorio actual y configurará todo por ti.
Resumen de Comandos:
- Crear proyecto:
crear-vite <nombre-del-proyecto>
Iniciar servidor de desarrollo: El servidor de desarrollo se inicia automáticamente una vez creado el proyecto. También puedes iniciarlo manualmente con:
npm run dev
Abrir el proyecto en VS Code: Después de crear el proyecto, el script intentará abrirlo en VS Code. Si no tienes VS Code instalado, puedes abrir el proyecto manualmente.
Requisitos
Asegúrate de tener lo siguiente instalado:
- Node.js: Descargar Node.js
- npm (que viene con Node.js)
Licencia
Este proyecto está licenciado bajo la Licencia ISC.
Solución de problemas
Si encuentras problemas, prueba lo siguiente:
- Asegúrate de tener instalado Node.js y npm.
- Asegúrate de estar conectado a npm si tienes problemas de permisos al publicar o instalar el paquete.