Skip to content

Commit 5564e75

Browse files
committed
Add installation guides, CI/CD workflows, and npm publishing documentation
1 parent dfd6094 commit 5564e75

5 files changed

Lines changed: 481 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18.x, 20.x]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Setup Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
cache: 'npm'
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Build
30+
run: npm run build
31+
32+
- name: Run tests
33+
run: npm test
34+
35+
- name: Check CLI works
36+
run: |
37+
node dist/cli.js --version
38+
node dist/cli.js --help

.github/workflows/publish.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish to npm
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Setup Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: 18
18+
registry-url: 'https://registry.npmjs.org'
19+
20+
- name: Install dependencies
21+
run: npm ci
22+
23+
- name: Build
24+
run: npm run build
25+
26+
- name: Run tests
27+
run: npm test
28+
29+
- name: Publish to npm
30+
run: npm publish
31+
env:
32+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

INSTALL.md

Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
# Installation Guide
2+
3+
## For Users
4+
5+
### Quick Start (Recommended)
6+
7+
The easiest way to use CreateForge is with `npx` - no installation required:
8+
9+
```bash
10+
npx createforge
11+
```
12+
13+
This will run the latest version directly from npm.
14+
15+
### Global Installation
16+
17+
If you want to install CreateForge globally on your system:
18+
19+
```bash
20+
npm install -g createforge
21+
```
22+
23+
After installation, you can use either command:
24+
25+
```bash
26+
createforge create my-app
27+
# or
28+
forge create my-app
29+
```
30+
31+
### Verify Installation
32+
33+
Check that CreateForge is installed correctly:
34+
35+
```bash
36+
forge --version
37+
# or
38+
createforge --version
39+
```
40+
41+
## Usage Examples
42+
43+
### Create a new project interactively
44+
```bash
45+
npx createforge
46+
```
47+
48+
### Create with specific template
49+
```bash
50+
npx createforge my-saas --template nextjs-saas
51+
```
52+
53+
### Create and open in browser
54+
```bash
55+
npx createforge my-app --live
56+
```
57+
58+
### Add plugins to existing project
59+
```bash
60+
cd my-app
61+
forge add stripe
62+
forge add clerk
63+
```
64+
65+
### Check project health
66+
```bash
67+
forge health
68+
```
69+
70+
### Initialize GitHub and deployment
71+
```bash
72+
forge init --deploy vercel
73+
```
74+
75+
## For Developers
76+
77+
### Install from Source
78+
79+
1. Clone the repository:
80+
```bash
81+
git clone https://github.com/Om7035/createforge.git
82+
cd createforge
83+
```
84+
85+
2. Install dependencies:
86+
```bash
87+
npm install
88+
```
89+
90+
3. Build the project:
91+
```bash
92+
npm run build
93+
```
94+
95+
4. Link locally for testing:
96+
```bash
97+
npm link
98+
```
99+
100+
Now you can use `forge` or `createforge` commands globally, pointing to your local development version.
101+
102+
### Development Mode
103+
104+
Run in watch mode while developing:
105+
```bash
106+
npm run dev
107+
```
108+
109+
### Run Tests
110+
```bash
111+
npm test
112+
```
113+
114+
## Publishing to npm
115+
116+
When ready to publish (for maintainers):
117+
118+
1. Update version in `package.json`
119+
2. Build the project:
120+
```bash
121+
npm run build
122+
```
123+
124+
3. Publish to npm:
125+
```bash
126+
npm publish
127+
```
128+
129+
## Troubleshooting
130+
131+
### Command not found after global install
132+
133+
If you get "command not found" after `npm install -g createforge`:
134+
135+
1. Check npm global bin path:
136+
```bash
137+
npm bin -g
138+
```
139+
140+
2. Make sure this path is in your system's PATH environment variable
141+
142+
3. On Windows, you may need to restart your terminal
143+
144+
### Permission errors on Linux/Mac
145+
146+
If you get permission errors during global install:
147+
148+
```bash
149+
sudo npm install -g createforge
150+
```
151+
152+
Or configure npm to use a different directory:
153+
```bash
154+
mkdir ~/.npm-global
155+
npm config set prefix '~/.npm-global'
156+
export PATH=~/.npm-global/bin:$PATH
157+
```
158+
159+
### Module not found errors
160+
161+
Make sure all dependencies are installed:
162+
```bash
163+
npm install
164+
npm run build
165+
```
166+
167+
## Requirements
168+
169+
- **Node.js**: 18.0.0 or higher
170+
- **npm**: 7.0.0 or higher
171+
- **Git**: Required for project initialization
172+
173+
## Uninstalling
174+
175+
To remove CreateForge from your system:
176+
177+
```bash
178+
npm uninstall -g createforge
179+
```
180+
181+
## Support
182+
183+
- 📖 [Documentation](https://github.com/Om7035/createforge#readme)
184+
- 🐛 [Report Issues](https://github.com/Om7035/createforge/issues)
185+
- 💬 [Discussions](https://github.com/Om7035/createforge/discussions)

0 commit comments

Comments
 (0)