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 CHANGED
@@ -1,43 +1,59 @@
1
1
  # create-ifc-lite
2
2
 
3
- Scaffold IFClite projects in seconds.
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 my-ifc-app
8
+ npx create-ifc-lite <project-name> [--template <type>]
11
9
  ```
12
10
 
13
- ### Templates
11
+ That's it — no install step. The scaffolder picks `basic` if you don't pass a template.
14
12
 
15
- **Basic** (default) - Minimal TypeScript project for parsing IFC files:
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
- ```bash
20
+ # WebGPU 3D viewer (React + Vite + drag-and-drop)
27
21
  npx create-ifc-lite my-viewer --template react
28
- cd my-viewer
29
- npm install
30
- npm run dev
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>` | Template to use: `basic`, `threejs`, `babylonjs`, `react`, `server`, `server-native` (default: `basic`) |
52
+ | `--template <type>` | One of `basic`, `react`, `threejs`, `babylonjs`, `server`, `server-native` |
38
53
  | `--help` | Show help |
39
54
 
40
- ## Learn More
55
+ ## Learn more
41
56
 
42
- - [IFClite Documentation](https://louistrue.github.io/ifc-lite/)
43
- - [GitHub Repository](https://github.com/louistrue/ifc-lite)
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 result = execFileSync('npm', args, {
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();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-ifc-lite",
3
- "version": "1.14.5",
3
+ "version": "1.14.6",
4
4
  "description": "Create IFC-Lite projects with one command",
5
5
  "type": "module",
6
6
  "bin": {