Files
gpt-pilot/core/templates/javascript_react.py
Senko Rasic 87190391d9 merge gpt-pilot 0.2 codebase
This is a complete rewrite of the GPT Pilot core, from the ground
up, making the agentic architecture front and center, and also
fixing some long-standing problems with the database architecture
that weren't feasible to solve without breaking compatibility.

As the database structure and config file syntax have changed,
we have automatic imports for projects and current configs,
see the README.md file for details.

This also relicenses the project to FSL-1.1-MIT license.
2024-05-22 21:42:25 +02:00

39 lines
2.5 KiB
Python

from core.proc.process_manager import ProcessManager
async def install_hook(process_manager: ProcessManager):
"""
Command to run to complete the project scaffolding setup.
:param process_manager: ProcessManager instance to run the install commands with.
"""
await process_manager.run_command("npm install")
JAVASCRIPT_REACT = {
"path": "javascript_react",
"description": "React web app using Vite devserver/bundler",
"summary": "\n".join(
[
"* Initial setup with Vite for fast development",
"* Basic project structure for React development",
"* Development server setup for hot reloading",
"* Minimal configuration to get started with React",
]
),
"install_hook": install_hook,
"files": {
"vite.config.js": "Configuration file for Vite, a fast developer-friendly Javascript bundler/devserver.",
"index.html": "Main entry point for the project. It includes a basic HTML structure with a root div element and a script tag importing a JavaScript file named main.jsx using the module type. References: src/main.jsx",
".eslintrc.cjs": "Configuration file for ESLint, a static code analysis tool for identifying problematic patterns found in JavaScript code. It defines rules for linting JavaScript code with a focus on React applications.",
".gitignore": "Specifies patterns to exclude files and directories from being tracked by Git version control system. It is used to prevent certain files from being committed to the repository.",
"package.json": "Standard Nodejs package metadata file, specifies dependencies and start scripts. It also specifies that the project is a module.",
"public/.gitkeep": "Empty file",
"src/App.css": "Contains styling rules for the root element of the application, setting a maximum width, centering it on the page, adding padding, and aligning text to the center.",
"src/index.css": "Defines styling rules for the root element, body, and h1 elements of a web page.",
"src/App.jsx": "Defines a functional component that serves as the root component in the project. The component is exported as the default export. References: src/App.css",
"src/main.jsx": "Main entry point for a React application. It imports necessary modules, renders the main component 'App' inside a 'React.StrictMode' component, and mounts it to the root element in the HTML document. References: App.jsx, index.css",
"src/assets/.gitkeep": "Empty file",
},
}