eletract v1.0.0
eletract
š¦ Installation
Install Eletract globally using npm:
npm install -g eletract
You can create a new project using:
npx eletract projectname
To create a TypeScript project:
npx eletract projectname --template typescript
š Features
Instant React + Electron App Setup:
Create a fully working React + Electron project with just one command.Supports TypeScript and JavaScript:
Choose between JavaScript or TypeScript for your project.Electron Integration:
Automatically sets up Electron with your React app, including scripts to launch it.Dev Scripts Ready to Use:
Run your project with a single command (npm run dev
) that starts React and Electron together.Auto-Generated Project Structure:
The created project follows best practices and includes a workingelectron.js
entry file.
šÆ Usage
Once installed, run:
npx eletract <project-name>
Example:
npx eletract my-electron-app
To create a TypeScript project:
npx eletract my-electron-app --template typescript
Then navigate into the project directory and start the development environment:
cd my-electron-app
npm run dev
This command will launch both the React development server and Electron.
š Commands
eletract --help
Displays help information with all available commands and options.
eletract <project-name>
Creates a new React + Electron project inside a folder with the specified name.
eletract <project-name> --template typescript
Creates a new project using TypeScript instead of JavaScript.
š Project Structure
After running eletract
, your project will have the following structure:
my-electron-app/
āāā node_modules/
āāā public/
āāā src/
ā āāā App.tsx (or App.js for JavaScript projects)
ā āāā index.tsx (or index.js for JavaScript projects)
ā āāā styles.css
āāā electron/
ā āāā electron.js (Main Electron process)
āāā package.json
āāā tsconfig.json (only for TypeScript projects)
āāā README.md
āļø Configuration
Your package.json
will be automatically configured with the following scripts:
"scripts": {
"start": "react-scripts start",
"electron": "electron .",
"dev": "concurrently \"npm start\" \"wait-on http://localhost:3000 && npm run electron\""
}
This allows you to:
- Start the React development server:
npm start
- Start Electron separately:
npm run electron
- Run both together:
npm run dev
š¤ Contributing
We welcome contributions! If you'd like to improve Eletract, please fork the repository and submit a pull request. Before submitting, ensure that your changes follow the coding and documentation standards.
- Fork the repository
- Create a new branch for your feature or bug fix
- Implement your changes and ensure tests are passing
- Open a pull request with a description of your changes
š License
This project is licensed under the MIT License.
š¤ Author
Developed by Tommaso Bertocchi (alias JustSouichi).
5 months ago