@zntc/web 0.1.2 → 0.1.3

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.
Files changed (2) hide show
  1. package/README.md +46 -18
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,29 +1,40 @@
1
1
  # @zntc/web
2
2
 
3
- ZNTC web platform layer — dev server (HTTP/HTTPS + WebSocket HMR), HMR overlay, postcss/sass/lightningcss CSS pipeline, dev controller (file watcher + module graph).
3
+ English · **[한국어](./README_KO.md)**
4
4
 
5
- ## 설치
5
+ > ZNTC web platform layer — dev server (HTTP/HTTPS + WebSocket HMR), HMR overlay, postcss / sass / lightningcss CSS pipeline, and dev controller (file watcher + module graph).
6
+
7
+ [![npm](https://img.shields.io/npm/v/@zntc/web.svg)](https://www.npmjs.com/package/@zntc/web)
8
+ [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/ohah/zntc/blob/main/LICENSE)
9
+
10
+ `@zntc/web` powers the app-mode side of [ZNTC](https://github.com/ohah/zntc): the `zntc dev` / `zntc preview` / `zntc build` commands. It adds a dev server with WebSocket-based HMR, an error overlay, a CSS pipeline (postcss / sass / lightningcss), and a dev controller that wires a file watcher to the module graph. The `zntc` CLI loads this package automatically, so you rarely import it yourself.
11
+
12
+ ## Installation
6
13
 
7
14
  ```bash
8
15
  bun add -D @zntc/web
9
- # 또는
16
+ # or
10
17
  npm i -D @zntc/web
11
18
  ```
12
19
 
13
- `@zntc/core` dependency 자동 install 됨 (NAPI binary 포함).
20
+ `@zntc/core` (which ships the native NAPI binary and the `zntc` CLI) is installed automatically as a dependency.
14
21
 
15
- ### Optional (CSS pipeline)
22
+ ### Optional CSS pipeline
16
23
 
17
24
  ```bash
18
25
  bun add -D postcss postcss-load-config sass
19
26
  ```
20
27
 
21
- - `postcss` / `postcss-load-config` — `postcss.config.{js,ts}` 자동 탐색 / Tailwind / PostCSS plugins
22
- - `sass` — `.scss` / `.sass` 파일 처리
28
+ - `postcss` / `postcss-load-config` — auto-discovers `postcss.config.{js,ts}` for Tailwind and other PostCSS plugins
29
+ - `sass` — handles `.scss` / `.sass` files
23
30
 
24
- ## 사용
31
+ These are optional dependencies; install only what your project needs.
25
32
 
26
- `zntc dev`, `zntc preview`, `zntc build` (app mode) CLI 가 자동으로 `@zntc/web` 을 dynamic import 해서 사용. 사용자 코드에서 직접 import 할 일은 거의 없음.
33
+ ## Usage
34
+
35
+ ### Dev server + HMR
36
+
37
+ In app mode, the `zntc` CLI dynamically imports `@zntc/web` for you — installing the package is all that's required:
27
38
 
28
39
  ```bash
29
40
  bunx zntc dev # dev server + HMR
@@ -31,18 +42,35 @@ bunx zntc build # production app build
31
42
  bunx zntc preview # production preview server
32
43
  ```
33
44
 
34
- 자세한 설정: [docs/CONFIG.md](https://github.com/ohah/zts/blob/main/docs/CONFIG.md) · [docs/HMR.md](https://github.com/ohah/zts/blob/main/docs/HMR.md)
45
+ `zntc dev` serves your app over HTTP (or HTTPS when TLS options are set), pushes Hot Module Replacement updates over WebSocket, and surfaces build errors through the HMR overlay in the browser.
46
+
47
+ ### postcss / sass
48
+
49
+ When the optional CSS packages are installed, the CSS pipeline activates automatically:
50
+
51
+ - `postcss.config.{js,ts}` is auto-discovered (Tailwind / PostCSS plugins).
52
+ - `.scss` / `.sass` files are compiled through `sass`.
53
+ - lightningcss handles transforms and minification.
54
+
55
+ No extra configuration is needed beyond installing the relevant packages.
56
+
57
+ ### Direct import (advanced)
58
+
59
+ `createAppDevController` is the dev controller's main entry point. It consumes the result of `prepareAppDevSync` from `@zntc/core` and exposes a broad option surface for embedding the dev server in custom tooling. The package also exports a `@zntc/web/css` entry for the CSS pipeline. See the [HMR guide](https://ohah.github.io/zntc) for usage examples.
60
+
61
+ ## Documentation
35
62
 
36
- ## 직접 import (고급)
63
+ 📚 **Official docs: <https://ohah.github.io/zntc>**
37
64
 
38
- `createAppDevController` dev controller 의 main entry. 옵션 surface 가 넓고 `@zntc/core` `prepareAppDevSync` 결과를 받음 — 사용 예는 [docs/HMR.md](https://github.com/ohah/zts/blob/main/docs/HMR.md) 참조.
65
+ - Monorepo / source: <https://github.com/ohah/zntc>
66
+ - Config reference and HMR details are part of the main ZNTC documentation.
39
67
 
40
- ## 관련 패키지
68
+ Related packages:
41
69
 
42
- - [@zntc/core](https://npmjs.com/package/@zntc/core) — 트랜스파일러 / 번들러 코어
43
- - [@zntc/react-native](https://npmjs.com/package/@zntc/react-native) — RN platform layer
44
- - [@zntc/vite-plugin](https://npmjs.com/package/@zntc/vite-plugin) — Vite 사용 ZNTC transform 적용
70
+ - [@zntc/core](https://www.npmjs.com/package/@zntc/core) — transpiler / bundler core
71
+ - [@zntc/react-native](https://www.npmjs.com/package/@zntc/react-native) — React Native platform layer
72
+ - [@zntc/vite-plugin](https://www.npmjs.com/package/@zntc/vite-plugin) — apply the ZNTC transform when using Vite
45
73
 
46
- ## 라이센스
74
+ ## License
47
75
 
48
- MIT.
76
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zntc/web",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "ZNTC web platform — dev server + HMR overlay + postcss/sass pipeline + dev controller",
5
5
  "keywords": [
6
6
  "bundler",
@@ -49,11 +49,11 @@
49
49
  "prepublishOnly": "bun run build && node -e \"require('node:fs').statSync('dist/dev-overlay-client.raw.js')\" && bunx publint --strict --level error ."
50
50
  },
51
51
  "dependencies": {
52
- "@zntc/core": "0.1.2"
52
+ "@zntc/core": "0.1.3"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/node": "^25.5.2",
56
- "@zntc/server": "0.1.2"
56
+ "@zntc/server": "0.1.3"
57
57
  },
58
58
  "optionalDependencies": {
59
59
  "postcss": "^8.5.8",