Skip to content

Commit 85be27c

Browse files
committed
Upgrade: Migrate from npm to pnpm
1 parent 3fde304 commit 85be27c

File tree

5 files changed

+6733
-22285
lines changed

5 files changed

+6733
-22285
lines changed

README.md

Lines changed: 47 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,51 +15,81 @@ An Electron-based desktop application for interacting with various AI models via
1515
### Prerequisites
1616

1717
- Node.js (v18+)
18-
- npm or yarn
18+
- npm
19+
- pnpm (v10.x)
1920

2021
### Installation
2122

2223
1. Clone the repository:
23-
```
24+
```bash
2425
git clone https://github.com/TensorBlock/TensorBlock-Studio.git
2526
cd tensorblock-studio
2627
```
2728

28-
2. Install dependencies:
29-
```
30-
npm install
29+
2. Install pnpm globally (If you don't have it installed)
30+
```bash
31+
npm install -g pnpm@latest-10
3132
```
3233

33-
3. Create a `.env` file in the root directory (based on `.env.example`):
34-
```
35-
cp .env.example .env
34+
3. Install dependencies:
35+
```bash
36+
pnpm install
3637
```
3738

38-
4. Add your OpenAI API key to the `.env` file:
39+
### Migrate from npm
40+
41+
1. Remove current `node_modules` folder. (If you have it)
42+
43+
2. Remove `package-lock.json` file from the root. (If you have it)
44+
45+
3. Install pnpm globally (If you don't have it installed)
46+
```bash
47+
npm install -g pnpm@latest-10
3948
```
40-
VITE_OPENAI_API_KEY=your_openai_api_key_here
49+
50+
4. Install dependencies:
51+
```bash
52+
pnpm install
4153
```
4254

55+
5. If you receive the warning:
56+
```base
57+
╭ Warning ───────────────────────────────────────────────────────────────────────────────────╮
58+
│ │
59+
│ Ignored build scripts: electron, esbuild. │
60+
│ Run "pnpm approve-builds" to pick which dependencies should be allowed to run scripts. │
61+
│ │
62+
╰────────────────────────────────────────────────────────────────────────────────────────────╯
63+
```
64+
Run ```pnpm approve-builds``` and allow all build scripts.
65+
4366
### Development
4467

4568
Run the application in development mode:
4669

70+
```bash
71+
pnpm run dev
4772
```
48-
npm run dev
73+
74+
Or:
75+
76+
```bash
77+
npm run dev # This will also use pnpm to run the scripts
4978
```
5079

80+
5181
### Building for Production
5282

53-
Build the application for production:
83+
Package the application for your current platform:
5484

55-
```
56-
npm run build:prod
85+
```bash
86+
pnpm run electron:build:current_platform
5787
```
5888

59-
Package the application for your current platform:
89+
Or:
6090

61-
```
62-
npm run electron:build:current_platform
91+
```bash
92+
npm run electron:build:current_platform # This will also use pnpm to run the scripts
6393
```
6494

6595
## Architecture

0 commit comments

Comments
 (0)