@moneymap/ui 0.0.3 → 0.0.5
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 +404 -283
- package/dist/index.esm.js +11360 -5120
- package/dist/src/components/alert-dialog/index.d.ts +15 -0
- package/dist/src/components/alert-dialog/index.d.ts.map +1 -0
- package/dist/src/components/badge/index.d.ts +10 -0
- package/dist/src/components/badge/index.d.ts.map +1 -0
- package/dist/src/components/button-group/index.d.ts +13 -0
- package/dist/src/components/button-group/index.d.ts.map +1 -0
- package/dist/src/components/calendar/index.d.ts +9 -0
- package/dist/src/components/calendar/index.d.ts.map +1 -0
- package/dist/src/components/separator/index.d.ts +5 -0
- package/dist/src/components/separator/index.d.ts.map +1 -0
- package/dist/src/index.d.ts +5 -0
- package/dist/src/index.d.ts.map +1 -1
- package/package.json +15 -2
- package/src/components/alert/index.tsx +1 -1
- package/src/components/alert-dialog/index.tsx +155 -0
- package/src/components/badge/index.tsx +46 -0
- package/src/components/button-group/index.tsx +84 -0
- package/src/components/calendar/index.tsx +211 -0
- package/src/components/separator/index.tsx +26 -0
- package/src/index.ts +9 -4
package/README.md
CHANGED
|
@@ -1,283 +1,404 @@
|
|
|
1
|
-
# @moneymap/ui
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
#
|
|
136
|
-
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
npm
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
npm
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
##
|
|
282
|
-
|
|
283
|
-
|
|
1
|
+
# @moneymap/ui
|
|
2
|
+
|
|
3
|
+
> **⚠️ Tailwind CSS v3 Required:** This library requires Tailwind CSS to be configured in your project. See [Setup](#setup-required) below.
|
|
4
|
+
|
|
5
|
+
## Setup Required
|
|
6
|
+
|
|
7
|
+
### Tailwind CSS v3 Setup
|
|
8
|
+
|
|
9
|
+
1. **Install Tailwind CSS:**
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install -D tailwindcss postcss autoprefixer
|
|
13
|
+
npx tailwindcss init -p
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
2. **Configure Tailwind to scan the library** (`tailwind.config.js`):
|
|
17
|
+
|
|
18
|
+
```javascript
|
|
19
|
+
/** @type {import('tailwindcss').Config} */
|
|
20
|
+
module.exports = {
|
|
21
|
+
content: [
|
|
22
|
+
'./src/**/*.{js,jsx,ts,tsx}',
|
|
23
|
+
'./node_modules/@moneymap/ui/**/*.{js,jsx,ts,tsx}', // Add this
|
|
24
|
+
],
|
|
25
|
+
theme: {
|
|
26
|
+
extend: {
|
|
27
|
+
colors: {
|
|
28
|
+
border: 'hsl(var(--border))',
|
|
29
|
+
input: 'hsl(var(--input))',
|
|
30
|
+
ring: 'hsl(var(--ring))',
|
|
31
|
+
background: 'hsl(var(--background))',
|
|
32
|
+
foreground: 'hsl(var(--foreground))',
|
|
33
|
+
primary: {
|
|
34
|
+
DEFAULT: 'hsl(var(--primary))',
|
|
35
|
+
foreground: 'hsl(var(--primary-foreground))',
|
|
36
|
+
},
|
|
37
|
+
secondary: {
|
|
38
|
+
DEFAULT: 'hsl(var(--secondary))',
|
|
39
|
+
foreground: 'hsl(var(--secondary-foreground))',
|
|
40
|
+
},
|
|
41
|
+
destructive: {
|
|
42
|
+
DEFAULT: 'hsl(var(--destructive))',
|
|
43
|
+
foreground: 'hsl(var(--destructive-foreground))',
|
|
44
|
+
},
|
|
45
|
+
muted: {
|
|
46
|
+
DEFAULT: 'hsl(var(--muted))',
|
|
47
|
+
foreground: 'hsl(var(--muted-foreground))',
|
|
48
|
+
},
|
|
49
|
+
accent: {
|
|
50
|
+
DEFAULT: 'hsl(var(--accent))',
|
|
51
|
+
foreground: 'hsl(var(--accent-foreground))',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
borderRadius: {
|
|
55
|
+
lg: 'var(--radius)',
|
|
56
|
+
md: 'calc(var(--radius) - 2px)',
|
|
57
|
+
sm: 'calc(var(--radius) - 4px)',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
plugins: [],
|
|
62
|
+
};
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
3. **Add CSS variables to your global CSS** (e.g., `globals.css` or `index.css`):
|
|
66
|
+
|
|
67
|
+
```css
|
|
68
|
+
@tailwind base;
|
|
69
|
+
@tailwind components;
|
|
70
|
+
@tailwind utilities;
|
|
71
|
+
|
|
72
|
+
@layer base {
|
|
73
|
+
:root {
|
|
74
|
+
--background: 0 0% 100%;
|
|
75
|
+
--foreground: 240 10% 3.9%;
|
|
76
|
+
--card: 0 0% 100%;
|
|
77
|
+
--card-foreground: 240 10% 3.9%;
|
|
78
|
+
--primary: 240 5.9% 10%;
|
|
79
|
+
--primary-foreground: 0 0% 98%;
|
|
80
|
+
--secondary: 240 4.8% 95.9%;
|
|
81
|
+
--secondary-foreground: 240 5.9% 10%;
|
|
82
|
+
--muted: 240 4.8% 95.9%;
|
|
83
|
+
--muted-foreground: 240 3.8% 46.1%;
|
|
84
|
+
--accent: 240 4.8% 95.9%;
|
|
85
|
+
--accent-foreground: 240 5.9% 10%;
|
|
86
|
+
--destructive: 0 84.2% 60.2%;
|
|
87
|
+
--destructive-foreground: 0 0% 98%;
|
|
88
|
+
--border: 240 5.9% 90%;
|
|
89
|
+
--input: 240 5.9% 90%;
|
|
90
|
+
--ring: 240 5.9% 10%;
|
|
91
|
+
--radius: 0.5rem;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.dark {
|
|
95
|
+
--background: 240 10% 3.9%;
|
|
96
|
+
--foreground: 0 0% 98%;
|
|
97
|
+
--card: 240 10% 3.9%;
|
|
98
|
+
--card-foreground: 0 0% 98%;
|
|
99
|
+
--primary: 0 0% 98%;
|
|
100
|
+
--primary-foreground: 240 5.9% 10%;
|
|
101
|
+
--secondary: 240 3.7% 15.9%;
|
|
102
|
+
--secondary-foreground: 0 0% 98%;
|
|
103
|
+
--muted: 240 3.7% 15.9%;
|
|
104
|
+
--muted-foreground: 240 5% 64.9%;
|
|
105
|
+
--accent: 240 3.7% 15.9%;
|
|
106
|
+
--accent-foreground: 0 0% 98%;
|
|
107
|
+
--destructive: 0 62.8% 30.6%;
|
|
108
|
+
--destructive-foreground: 0 0% 98%;
|
|
109
|
+
--border: 240 3.7% 15.9%;
|
|
110
|
+
--input: 240 3.7% 15.9%;
|
|
111
|
+
--ring: 240 4.9% 83.9%;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
# Maintainers
|
|
119
|
+
|
|
120
|
+
The sections below are for developers who need to build and publish the `@moneymap/ui` library to npm registry.
|
|
121
|
+
|
|
122
|
+
## Prerequisites
|
|
123
|
+
|
|
124
|
+
- Node.js and pnpm installed
|
|
125
|
+
- npm account with access to publish to `@moneymap` scope
|
|
126
|
+
- Access to the MoneyMap monorepo
|
|
127
|
+
|
|
128
|
+
## Project Structure
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
libs/ui/
|
|
132
|
+
├── src/ # Source components
|
|
133
|
+
├── dist/ # Build output (generated)
|
|
134
|
+
├── package.json # Package configuration
|
|
135
|
+
├── rollup.config.cjs # Build configuration
|
|
136
|
+
└── README.md # This file
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Publishing Workflow
|
|
140
|
+
|
|
141
|
+
### 1. Clean and Build
|
|
142
|
+
|
|
143
|
+
Reset Nx cache and build the library:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
# From workspace root
|
|
147
|
+
nx reset
|
|
148
|
+
nx build ui
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
This generates the build output in `libs/ui/dist/`:
|
|
152
|
+
|
|
153
|
+
- `dist/index.esm.js` - Compiled JavaScript bundle
|
|
154
|
+
- `dist/index.d.ts` - TypeScript declarations
|
|
155
|
+
- `dist/src/` - Source files for `@moneymap/source` export
|
|
156
|
+
|
|
157
|
+
### 2. Login to npm
|
|
158
|
+
|
|
159
|
+
Ensure you're logged into npm with an account that has publish access:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
npm login
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Verify your login:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
npm whoami
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### 3. Test Package (Dry Run)
|
|
172
|
+
|
|
173
|
+
Preview what will be published without actually publishing:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
cd libs/ui
|
|
177
|
+
npm pack --dry-run
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
**Expected output should include:**
|
|
181
|
+
|
|
182
|
+
- ✅ `dist/index.esm.js`
|
|
183
|
+
- ✅ `dist/index.d.ts`
|
|
184
|
+
- ✅ `dist/src/` (source files)
|
|
185
|
+
- ✅ `package.json`
|
|
186
|
+
- ✅ `README.md`
|
|
187
|
+
- ❌ No config files (`.babelrc`, `rollup.config.cjs`, `tsconfig.*`)
|
|
188
|
+
|
|
189
|
+
### 4. Version Bump
|
|
190
|
+
|
|
191
|
+
**Important:** You must increment the version before publishing.
|
|
192
|
+
|
|
193
|
+
#### For Prerelease (Alpha/Beta)
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
# From libs/ui/
|
|
197
|
+
npm version prerelease --preid=alpha
|
|
198
|
+
# Example: 0.0.1-alpha.0 → 0.0.1-alpha.1
|
|
199
|
+
# Example: 0.0.1-beta.0 → 0.0.1-beta.1
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
#### For Patch Release
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
npm version patch
|
|
206
|
+
# Example: 0.0.1 → 0.0.2
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
#### For Minor Release
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
npm version minor
|
|
213
|
+
# Example: 0.0.1 → 0.1.0
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
#### For Major Release
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
npm version major
|
|
220
|
+
# Example: 0.0.1 → 1.0.0
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
#### Manual Version Update
|
|
224
|
+
|
|
225
|
+
Alternatively, edit `libs/ui/package.json` directly:
|
|
226
|
+
|
|
227
|
+
```json
|
|
228
|
+
{
|
|
229
|
+
"version": "0.0.1"
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### 5. Publish to npm
|
|
234
|
+
|
|
235
|
+
#### Publish Prerelease (Alpha/Beta)
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
# From libs/ui/
|
|
239
|
+
npm publish --tag alpha --access public
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
This publishes with the `alpha` tag, so it won't become the default `latest` version.
|
|
243
|
+
|
|
244
|
+
**Installing prerelease:**
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
npm install @moneymap/ui@alpha
|
|
248
|
+
# or specific version
|
|
249
|
+
npm install @moneymap/ui@0.0.1-alpha.1
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
#### Publish Stable Release
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
# From libs/ui/
|
|
256
|
+
npm publish --access public
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
This publishes with the `latest` tag (default).
|
|
260
|
+
|
|
261
|
+
**Installing stable:**
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
npm install @moneymap/ui
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### 6. Verify Publication
|
|
268
|
+
|
|
269
|
+
Check the published package:
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
npm view @moneymap/ui
|
|
273
|
+
|
|
274
|
+
# Check all versions
|
|
275
|
+
npm view @moneymap/ui versions
|
|
276
|
+
|
|
277
|
+
# Check dist-tags
|
|
278
|
+
npm view @moneymap/ui dist-tags
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
## Quick Reference Commands
|
|
282
|
+
|
|
283
|
+
```bash
|
|
284
|
+
# Full deployment workflow (stable release)
|
|
285
|
+
nx reset
|
|
286
|
+
nx build ui
|
|
287
|
+
cd libs/ui
|
|
288
|
+
npm pack --dry-run # Verify package contents
|
|
289
|
+
npm version patch # Bump version
|
|
290
|
+
npm publish --access public # Publish
|
|
291
|
+
|
|
292
|
+
# Full deployment workflow (prerelease)
|
|
293
|
+
nx reset
|
|
294
|
+
nx build ui
|
|
295
|
+
cd libs/ui
|
|
296
|
+
npm pack --dry-run
|
|
297
|
+
npm version prerelease --preid=alpha
|
|
298
|
+
npm publish --tag alpha --access public
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
## Troubleshooting
|
|
302
|
+
|
|
303
|
+
### Cannot publish over previously published version
|
|
304
|
+
|
|
305
|
+
You're trying to publish a version that already exists. Bump the version number:
|
|
306
|
+
|
|
307
|
+
```bash
|
|
308
|
+
npm version patch
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
### Package includes unwanted files
|
|
312
|
+
|
|
313
|
+
Check the `files` field in `libs/ui/package.json`:
|
|
314
|
+
|
|
315
|
+
```json
|
|
316
|
+
{
|
|
317
|
+
"files": [
|
|
318
|
+
"dist",
|
|
319
|
+
"src/**/*.ts",
|
|
320
|
+
"src/**/*.tsx",
|
|
321
|
+
"!src/**/*.test.ts",
|
|
322
|
+
"!src/**/*.spec.ts"
|
|
323
|
+
]
|
|
324
|
+
}
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
Run `npm pack --dry-run` to preview before publishing.
|
|
328
|
+
|
|
329
|
+
## Package Configuration
|
|
330
|
+
|
|
331
|
+
### package.json
|
|
332
|
+
|
|
333
|
+
The `libs/ui/package.json` controls what gets published:
|
|
334
|
+
|
|
335
|
+
```json
|
|
336
|
+
{
|
|
337
|
+
"name": "@moneymap/ui",
|
|
338
|
+
"version": "0.0.1",
|
|
339
|
+
"main": "./dist/index.esm.js",
|
|
340
|
+
"types": "./dist/index.d.ts",
|
|
341
|
+
"exports": {
|
|
342
|
+
".": {
|
|
343
|
+
"@moneymap/source": "./src/index.ts",
|
|
344
|
+
"types": "./dist/index.d.ts",
|
|
345
|
+
"import": "./dist/index.esm.js"
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
"files": [
|
|
349
|
+
"dist",
|
|
350
|
+
"src/**/*.ts",
|
|
351
|
+
"src/**/*.tsx",
|
|
352
|
+
"!src/**/*.test.ts",
|
|
353
|
+
"!src/**/*.spec.ts"
|
|
354
|
+
]
|
|
355
|
+
}
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
### rollup.config.cjs
|
|
359
|
+
|
|
360
|
+
The build configuration uses Rollup with SWC for fast compilation:
|
|
361
|
+
|
|
362
|
+
```javascript
|
|
363
|
+
module.exports = withNx({
|
|
364
|
+
main: './src/index.ts',
|
|
365
|
+
outputPath: './dist',
|
|
366
|
+
compiler: 'swc',
|
|
367
|
+
format: ['esm'],
|
|
368
|
+
external: ['react', 'react-dom', 'react/jsx-runtime'],
|
|
369
|
+
assets: [
|
|
370
|
+
{ input: '.', output: '.', glob: 'README.md' },
|
|
371
|
+
{
|
|
372
|
+
input: './src',
|
|
373
|
+
output: './src',
|
|
374
|
+
glob: '**/*.ts',
|
|
375
|
+
ignore: ['**/*.spec.ts', '**/*.test.ts'],
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
input: './src',
|
|
379
|
+
output: './src',
|
|
380
|
+
glob: '**/*.tsx',
|
|
381
|
+
ignore: ['**/*.spec.tsx', '**/*.test.tsx'],
|
|
382
|
+
},
|
|
383
|
+
],
|
|
384
|
+
});
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
## Version Strategy
|
|
388
|
+
|
|
389
|
+
- **Prerelease (alpha/beta):** For testing new features
|
|
390
|
+
- Format: `0.0.1-alpha.0`, `0.0.1-beta.1`
|
|
391
|
+
- Publish with: `npm publish --tag alpha`
|
|
392
|
+
|
|
393
|
+
- **Patch (0.0.x):** Bug fixes and minor changes
|
|
394
|
+
- Command: `npm version patch`
|
|
395
|
+
|
|
396
|
+
- **Minor (0.x.0):** New features, backward compatible
|
|
397
|
+
- Command: `npm version minor`
|
|
398
|
+
|
|
399
|
+
- **Major (x.0.0):** Breaking changes
|
|
400
|
+
- Command: `npm version major`
|
|
401
|
+
|
|
402
|
+
## Support
|
|
403
|
+
|
|
404
|
+
For questions or issues, contact the MoneyMap development team.
|