@sse-ui/builder 1.3.0 → 1.3.2

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 ADDED
@@ -0,0 +1,78 @@
1
+ # @sse-ui/builder (sse-tools)
2
+
3
+ `sse-tools` is a high-performance CLI utility designed for managing, building, and publishing software packages within the SSE ecosystem. It provides a unified interface for library development, supporting both Babel for individual file transpilation and esbuild for high-speed bundling.
4
+
5
+ ## ✨ Features
6
+
7
+ - **Hybrid Builder Engine**: Seamlessly switch between Babel for detailed transpilation or esbuild for rapid bundling via simple configuration.
8
+ - **Vite-style Watch Mode**: Features an incremental watcher that rebuilds only the specific files you change, significantly speeding up development loops.
9
+ - **Intelligent Export Management**: Automatically generates and optimizes your package.json exports field based on your build output, supporting both flat and nested structures.
10
+ - **TypeScript-First**: Built-in support for generating and bundling .d.ts declaration files using either standard tsc or the high-performance tsgo compiler.
11
+ - **React Compiler Support**: Integrated support for the React compiler, including automatic environment configuration and peer-dependency validation.
12
+ - **Interactive Versioning**: A CLI-guided versioning system that helps you bump package versions safely using SemVer standards.
13
+
14
+ ## 🚀 Installation
15
+
16
+ Install the package as a development dependency:
17
+
18
+ ```bash
19
+ npm install --save-dev @sse-ui/builder
20
+ ```
21
+
22
+ ## 🛠 Usage
23
+
24
+ Once installed, you can access the utility via the `sse-tools` command.
25
+
26
+ ### Core Commands
27
+
28
+ | Command | Description |
29
+ | --------------- | ------------------------------------------------------------------------------------ |
30
+ | `init` | To initializes the package with the required configuration files |
31
+ | `build` | Compiles the package for production using Babel or esbuild. |
32
+ | `watch` | Starts an incremental rebuild watcher for rapid development. |
33
+ | `typecheck` | Validates TypeScript types across the project without emitting files. |
34
+ | `check-exports` | Verifies that all files declared in package.json actually exist in the build folder. |
35
+ | `version` | Interactively bumps the package version (patch, minor, major). |
36
+ | `publish` | Publishes the built package directly from your specified build directory. |
37
+ | `info` | Displays size and file statistics for your built package. |
38
+ | `clean` | Safely removes the build directory to ensure a fresh start. |
39
+ | `remove` | Safely removes all configuration files and dependencies added by the init command |
40
+
41
+ ## ⚙️ Configuration
42
+
43
+ `sse-tools` uses `c12` for robust configuration loading. You can define your configuration in `sse.config.ts`, `sse.config.js`, or within your `package.json`.
44
+
45
+ ```typescript
46
+ import { defineConfig } from "@sse-ui/builder/config";
47
+
48
+ export default defineConfig({
49
+ bundle: ["esm", "cjs"],
50
+ buildTypes: true,
51
+ flat: false,
52
+
53
+ // Use esbuild for bundling single files
54
+ esbuild: {
55
+ entry: "src/index.ts",
56
+ target: "es2022",
57
+ },
58
+ });
59
+ ```
60
+
61
+ ### Build Options
62
+
63
+ - `bundle`: Specify output formats, such as `["esm", "cjs"]`.
64
+ - `flat`: When enabled, builds a flat structure instead of using format-specific subdirectories.
65
+ - `copy`: Define an array of glob patterns to copy static assets or documentation into the build folder.
66
+ - `tsgo`: Toggle between `tsc` and `tsgo` for faster type generation.
67
+
68
+ ## Docs
69
+
70
+ Go to the Docs [click here](./docs)
71
+
72
+ ## Example
73
+
74
+ Go to the Example [Click Here](./example)
75
+
76
+ ## 📄 License
77
+
78
+ This project is licensed under the `MIT` License.
@@ -4,7 +4,6 @@ import {
4
4
  getVersionEnvVariables
5
5
  } from "./chunk-6NNEV5YX.js";
6
6
  import "./chunk-N46AJ2OI.js";
7
- import "./chunk-MLKGABMK.js";
8
7
  export {
9
8
  build,
10
9
  cjsCopy,
@@ -1,5 +1,3 @@
1
- import "./chunk-MLKGABMK.js";
2
-
3
1
  // src/babel-config.ts
4
2
  import pluginTransformRuntime from "@ssets/babel/plugin/transform-runtime";
5
3
  import presetEnv from "@ssets/babel/preset/env";