@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 +78 -0
- package/dist/{babel-6NHCDM3A.js → babel-2PBTAJV6.js} +0 -1
- package/dist/babel-config.js +0 -2
- package/dist/cli.js +445 -148
- package/dist/config.js +0 -2
- package/dist/typescript-2XUZHHI2.js +286 -0
- package/package.json +3 -3
- package/dist/acorn-RZKYEOCN.js +0 -3130
- package/dist/angular-65ZVA2AO.js +0 -3070
- package/dist/babel-6NAC7UZ3.js +0 -7296
- package/dist/chunk-MLKGABMK.js +0 -9
- package/dist/estree-SLPC3MKU.js +0 -4612
- package/dist/flow-JKSA2WQA.js +0 -27546
- package/dist/glimmer-KH4FHVWK.js +0 -2894
- package/dist/graphql-X7RDVKKC.js +0 -1266
- package/dist/html-A2DZMMEZ.js +0 -2933
- package/dist/markdown-35RS3VXW.js +0 -3553
- package/dist/meriyah-UIMGFPH2.js +0 -2684
- package/dist/postcss-CITECRUH.js +0 -5080
- package/dist/typescript-42L4XZEH.js +0 -20538
- package/dist/typescript-CFZSZQGQ.js +0 -13203
- package/dist/yaml-RAY3ED75.js +0 -4224
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.
|