Tech-Talk-FS / create-fso-stack

0 stars 0 forks source link

Boiler plate package.json #4

Open IrwinJames-FS opened 11 hours ago

IrwinJames-FS commented 11 hours ago

We need a boiler plate package.json files ideally instead of running npm create vite@latest we might be able to just copy the package.json and run npm install.

Root package

Client package

Dependencies

  1. Install MUI?
  2. SCSS?
  3. ReactRouter?
  4. vitetest

Server package

BradleyMatera commented 9 hours ago

Issue: Creating a Boilerplate package.json for Project Automation

Goal

To streamline project setup, the objective is to avoid the interactive prompts of npm create vite@latest by establishing a pre-configured boilerplate package.json. This approach simplifies the process, enabling the project structure to be established by copying the package.json and running npm install, minimizing manual steps.

Structure and Requirements

Root Package

The root package.json serves as the base, providing essential dependencies and scripts.

Client Package

The client package includes the Vite setup with necessary dependencies for the frontend.

Server Package

The server package includes the backend setup, with dependencies for API and backend functionality.

Actions Taken

  1. Configured vite.config.js for explicit JSX syntax parsing, addressing Vite's Rollup import issues.
  2. Renamed App.js to App.jsx for clear JSX parsing, addressing Vite’s import issues.
  3. Created package.json files for both client and server, ensuring each has the needed dependencies and scripts.

Testing and Publishing

This configuration and repository setup has been published on GitHub at BradleyMatera/devtest. Links to specific files and configurations are provided below:

This approach allows for a fast and consistent setup, enabling the project to be ready for development immediately, without requiring any interactive CLI steps. The repository structure provides a clear separation between client and server, which promotes organized and maintainable code.