create-ifc-lite 1.14.5 → 1.14.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -20
- package/dist/utils/config-fixers.js +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,43 +1,59 @@
|
|
|
1
1
|
# create-ifc-lite
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Scaffolds an IFClite project in seconds. One command, working code.
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
|
-
### Create a new project
|
|
8
|
-
|
|
9
7
|
```bash
|
|
10
|
-
npx create-ifc-lite
|
|
8
|
+
npx create-ifc-lite <project-name> [--template <type>]
|
|
11
9
|
```
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
That's it — no install step. The scaffolder picks `basic` if you don't pass a template.
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
## Templates
|
|
16
14
|
|
|
17
15
|
```bash
|
|
16
|
+
# Minimal TypeScript project — parse an IFC file from a script
|
|
18
17
|
npx create-ifc-lite my-app
|
|
19
|
-
cd my-app
|
|
20
|
-
npm install
|
|
21
|
-
npm run parse ./model.ifc
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
**React** - React + Vite project with WebGPU rendering and drag-and-drop loading:
|
|
18
|
+
cd my-app && npm install && npm run parse ./model.ifc
|
|
25
19
|
|
|
26
|
-
|
|
20
|
+
# WebGPU 3D viewer (React + Vite + drag-and-drop)
|
|
27
21
|
npx create-ifc-lite my-viewer --template react
|
|
28
|
-
cd my-viewer
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
cd my-viewer && npm install && npm run dev
|
|
23
|
+
|
|
24
|
+
# Three.js (WebGL) viewer
|
|
25
|
+
npx create-ifc-lite my-viewer --template threejs
|
|
26
|
+
|
|
27
|
+
# Babylon.js (WebGL) viewer
|
|
28
|
+
npx create-ifc-lite my-viewer --template babylonjs
|
|
29
|
+
|
|
30
|
+
# Backend server (Rust binary, runs in Docker)
|
|
31
|
+
npx create-ifc-lite my-backend --template server
|
|
32
|
+
|
|
33
|
+
# Backend server (native binary, no Docker)
|
|
34
|
+
npx create-ifc-lite my-backend --template server-native
|
|
31
35
|
```
|
|
32
36
|
|
|
37
|
+
| Template | What you get | Stack |
|
|
38
|
+
|---|---|---|
|
|
39
|
+
| `basic` (default) | Minimal CLI parser | TypeScript + `@ifc-lite/parser` |
|
|
40
|
+
| `react` | WebGPU 3D viewer with drag-and-drop, hierarchy, properties | React + Vite + WebGPU |
|
|
41
|
+
| `threejs` | Three.js (WebGL) viewer | Three.js + Vite |
|
|
42
|
+
| `babylonjs` | Babylon.js (WebGL) viewer | Babylon.js + Vite |
|
|
43
|
+
| `server` | IFC parsing server (Docker) | Rust + Docker Compose |
|
|
44
|
+
| `server-native` | IFC parsing server (no Docker) | Rust binary via `@ifc-lite/server-bin` |
|
|
45
|
+
|
|
46
|
+
Each template ships with a `README.md` documenting what it does and how to extend it.
|
|
47
|
+
|
|
33
48
|
## Options
|
|
34
49
|
|
|
35
50
|
| Flag | Description |
|
|
36
51
|
|------|-------------|
|
|
37
|
-
| `--template <type>` |
|
|
52
|
+
| `--template <type>` | One of `basic`, `react`, `threejs`, `babylonjs`, `server`, `server-native` |
|
|
38
53
|
| `--help` | Show help |
|
|
39
54
|
|
|
40
|
-
## Learn
|
|
55
|
+
## Learn more
|
|
41
56
|
|
|
42
|
-
- [IFClite
|
|
43
|
-
- [GitHub
|
|
57
|
+
- [IFClite docs](https://louistrue.github.io/ifc-lite/)
|
|
58
|
+
- [GitHub repo](https://github.com/louistrue/ifc-lite)
|
|
59
|
+
- [Quick Start guide](https://github.com/louistrue/ifc-lite/blob/main/https://louistrue.github.io/ifc-lite/guide/quickstart/)
|
|
@@ -11,7 +11,9 @@ const VALID_PACKAGE_NAME = /^(?:@[\w.-]+\/)?[\w.-]+$/;
|
|
|
11
11
|
const NPM_TIMEOUT_MS = 30000;
|
|
12
12
|
const MAX_VERSION_CANDIDATES = 10;
|
|
13
13
|
function readJsonFromNpm(args) {
|
|
14
|
-
const
|
|
14
|
+
const command = process.platform === 'win32' ? process.env.ComSpec ?? 'cmd.exe' : 'npm';
|
|
15
|
+
const commandArgs = process.platform === 'win32' ? ['/d', '/s', '/c', 'npm', ...args] : args;
|
|
16
|
+
const result = execFileSync(command, commandArgs, {
|
|
15
17
|
stdio: 'pipe',
|
|
16
18
|
timeout: NPM_TIMEOUT_MS,
|
|
17
19
|
}).toString().trim();
|