ansimax 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/CHANGELOG.md +159 -0
- package/README.es.md +86 -2
- package/README.md +86 -2
- package/dist/index.d.mts +332 -2
- package/dist/index.d.ts +332 -2
- package/dist/index.js +149 -35
- package/dist/index.mjs +147 -35
- package/docs/README.md +110 -0
- package/docs/examples-cjs.md +706 -0
- package/docs/examples-mjs.md +676 -0
- package/docs/examples-ts.md +715 -0
- package/docs/showcase.md +398 -0
- package/examples/all-in-one.cjs +1 -1
- package/examples/all-in-one.mjs +1 -1
- package/package.json +2 -1
package/docs/showcase.md
ADDED
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
# š¬ ansimax ā Complete showcase
|
|
2
|
+
|
|
3
|
+
A complete, runnable demo app combining **every module** of ansimax in one realistic scenario. Save as `showcase.mjs` and run:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
node showcase.mjs
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
This file is **pure JavaScript ESM** ā no transpilation needed. You can copy-paste the whole thing into a single `.mjs` file and it will work.
|
|
10
|
+
|
|
11
|
+
> ā±ļø Approximate runtime: ~12 seconds (it's animated; the demo has intentional delays).
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## š The scenario
|
|
16
|
+
|
|
17
|
+
We're going to build a fake CLI for a fictional service called **`stardust`** ā a code-generation tool. The CLI does what real tools do: shows a banner, fetches data, runs build tasks, prints a results table, displays a project tree, and renders some pixel art.
|
|
18
|
+
|
|
19
|
+
This showcases:
|
|
20
|
+
|
|
21
|
+
1. **`color`** + **`gradient`** ā Header banner
|
|
22
|
+
2. **`ascii`** ā figlet text + box
|
|
23
|
+
3. **`animate`** ā Typewriter intro
|
|
24
|
+
4. **`loader`** ā Spinner during "fetch"
|
|
25
|
+
5. **`loader.tasks`** ā Multi-step build pipeline
|
|
26
|
+
6. **`components`** ā Status messages + table + badges + timeline
|
|
27
|
+
7. **`themes`** ā Switch active theme mid-run
|
|
28
|
+
8. **`trees`** ā Display project structure
|
|
29
|
+
9. **`frames`** ā Animated transitions
|
|
30
|
+
10. **`images`** ā Pixel art finale
|
|
31
|
+
11. **`panels`** ā Side-by-side layouts
|
|
32
|
+
12. **`json`** ā Pretty-printed config
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## š The complete code
|
|
37
|
+
|
|
38
|
+
```js
|
|
39
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
40
|
+
// ansimax ā complete showcase (v1.3.2)
|
|
41
|
+
//
|
|
42
|
+
// Run: node showcase.mjs
|
|
43
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
44
|
+
|
|
45
|
+
import {
|
|
46
|
+
color, gradient, animateGradient,
|
|
47
|
+
ascii, animate, loader, frames,
|
|
48
|
+
components, themes, trees,
|
|
49
|
+
renderPixelArt, gradientRect, SPRITES, createCanvas,
|
|
50
|
+
panels, json,
|
|
51
|
+
} from 'ansimax';
|
|
52
|
+
|
|
53
|
+
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
54
|
+
|
|
55
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
56
|
+
// Step 1 ā Header banner (color, gradient, ascii)
|
|
57
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
58
|
+
|
|
59
|
+
console.clear();
|
|
60
|
+
|
|
61
|
+
const banner = ascii.figletText('STARDUST', { font: 'standard' });
|
|
62
|
+
const colored = gradient(banner, ['#ff79c6', '#bd93f9', '#8be9fd']);
|
|
63
|
+
console.log(colored);
|
|
64
|
+
|
|
65
|
+
console.log(
|
|
66
|
+
panels.center(
|
|
67
|
+
color.bold('⨠Code generation, simplified āØ'),
|
|
68
|
+
{ width: 70 },
|
|
69
|
+
),
|
|
70
|
+
);
|
|
71
|
+
console.log();
|
|
72
|
+
|
|
73
|
+
await sleep(400);
|
|
74
|
+
|
|
75
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
76
|
+
// Step 2 ā Animated intro (animate.typewriter)
|
|
77
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
78
|
+
|
|
79
|
+
const introLines = [
|
|
80
|
+
'> Initializing stardust v2.4.1',
|
|
81
|
+
'> Loading configuration from .stardustrc',
|
|
82
|
+
'> Checking for updates...',
|
|
83
|
+
];
|
|
84
|
+
|
|
85
|
+
for (const line of introLines) {
|
|
86
|
+
await animate.typewriter(color.green(line), { speed: 22 });
|
|
87
|
+
console.log();
|
|
88
|
+
await sleep(150);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
console.log();
|
|
92
|
+
await sleep(300);
|
|
93
|
+
|
|
94
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
95
|
+
// Step 3 ā Show registered themes + switch (themes)
|
|
96
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
97
|
+
|
|
98
|
+
console.log(color.cyan('šØ Available themes: ') + themes.list().join(', '));
|
|
99
|
+
|
|
100
|
+
themes.use('dracula');
|
|
101
|
+
console.log(color.cyan(`šØ Active theme: `) + themes.current().name);
|
|
102
|
+
console.log();
|
|
103
|
+
|
|
104
|
+
await sleep(500);
|
|
105
|
+
|
|
106
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
107
|
+
// Step 4 ā Loader spinner during "fetch" (loader.spin)
|
|
108
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
109
|
+
|
|
110
|
+
const stop = loader.spin('Fetching template from registry...', {
|
|
111
|
+
type: 'dots',
|
|
112
|
+
color: '#bd93f9',
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
await sleep(1500);
|
|
116
|
+
stop('Template loaded: react-app-typescript', true);
|
|
117
|
+
console.log();
|
|
118
|
+
|
|
119
|
+
await sleep(300);
|
|
120
|
+
|
|
121
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
122
|
+
// Step 5 ā Hierarchical tasks (loader.tasks)
|
|
123
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
124
|
+
|
|
125
|
+
console.log(color.bold('\nš¦ Building project...\n'));
|
|
126
|
+
|
|
127
|
+
await loader.tasks([
|
|
128
|
+
{
|
|
129
|
+
text: 'Scaffold project structure',
|
|
130
|
+
fn: async () => sleep(400),
|
|
131
|
+
subtasks: [
|
|
132
|
+
{ text: 'Create directories', fn: async () => sleep(150) },
|
|
133
|
+
{ text: 'Copy template files', fn: async () => sleep(300) },
|
|
134
|
+
{ text: 'Generate package.json', fn: async () => sleep(200) },
|
|
135
|
+
],
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
text: 'Install dependencies',
|
|
139
|
+
fn: async () => sleep(200),
|
|
140
|
+
subtasks: [
|
|
141
|
+
{ text: 'Resolve versions', fn: async () => sleep(300) },
|
|
142
|
+
{ text: 'Download packages', fn: async () => sleep(600) },
|
|
143
|
+
{ text: 'Link binaries', fn: async () => sleep(200) },
|
|
144
|
+
],
|
|
145
|
+
},
|
|
146
|
+
{ text: 'Run initial build', fn: async () => sleep(500) },
|
|
147
|
+
{ text: 'Verify integrity', fn: async () => sleep(250) },
|
|
148
|
+
]);
|
|
149
|
+
|
|
150
|
+
console.log();
|
|
151
|
+
await sleep(300);
|
|
152
|
+
|
|
153
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
154
|
+
// Step 6 ā Components: status, badge, table (components)
|
|
155
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
156
|
+
|
|
157
|
+
console.log(components.status('success', 'Build completed in 2.4s'));
|
|
158
|
+
console.log(components.status('warn', '3 deprecation notices (run `stardust audit` for details)'));
|
|
159
|
+
console.log(components.status('info', 'Project ready at ./my-app'));
|
|
160
|
+
console.log();
|
|
161
|
+
|
|
162
|
+
console.log(
|
|
163
|
+
components.badge('VERSION', 'v2.4.1'),
|
|
164
|
+
components.badge('PROJECT', 'my-app'),
|
|
165
|
+
components.badge('FRAMEWORK', 'react'),
|
|
166
|
+
components.badge('TEMPLATE', 'typescript'),
|
|
167
|
+
);
|
|
168
|
+
console.log();
|
|
169
|
+
|
|
170
|
+
console.log(components.table([
|
|
171
|
+
['Stage', 'Duration', 'Status'],
|
|
172
|
+
['Scaffold', '650ms', color.green('ā done')],
|
|
173
|
+
['Dependencies', '1100ms', color.green('ā done')],
|
|
174
|
+
['Build', '500ms', color.green('ā done')],
|
|
175
|
+
['Verify', '250ms', color.green('ā done')],
|
|
176
|
+
['Total', '2500ms', color.green('ā success')],
|
|
177
|
+
], { borderStyle: 'rounded', padding: 1 }));
|
|
178
|
+
|
|
179
|
+
console.log();
|
|
180
|
+
await sleep(500);
|
|
181
|
+
|
|
182
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
183
|
+
// Step 7 ā Project structure (trees)
|
|
184
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
185
|
+
|
|
186
|
+
console.log(color.bold('š Project structure:\n'));
|
|
187
|
+
|
|
188
|
+
console.log(trees.tree({
|
|
189
|
+
label: 'my-app/',
|
|
190
|
+
children: [
|
|
191
|
+
{
|
|
192
|
+
label: 'src/',
|
|
193
|
+
children: [
|
|
194
|
+
{ label: 'components/', children: [
|
|
195
|
+
{ label: 'App.tsx' },
|
|
196
|
+
{ label: 'Header.tsx' },
|
|
197
|
+
{ label: 'Footer.tsx' },
|
|
198
|
+
]},
|
|
199
|
+
{ label: 'pages/', children: [
|
|
200
|
+
{ label: 'Home.tsx' },
|
|
201
|
+
{ label: 'About.tsx' },
|
|
202
|
+
]},
|
|
203
|
+
{ label: 'index.tsx' },
|
|
204
|
+
{ label: 'styles.css' },
|
|
205
|
+
],
|
|
206
|
+
},
|
|
207
|
+
{ label: 'public/', children: [
|
|
208
|
+
{ label: 'favicon.ico' },
|
|
209
|
+
{ label: 'logo.svg' },
|
|
210
|
+
]},
|
|
211
|
+
{ label: 'package.json' },
|
|
212
|
+
{ label: 'tsconfig.json' },
|
|
213
|
+
{ label: 'README.md' },
|
|
214
|
+
],
|
|
215
|
+
}, { style: 'unicode' }));
|
|
216
|
+
|
|
217
|
+
console.log();
|
|
218
|
+
await sleep(500);
|
|
219
|
+
|
|
220
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
221
|
+
// Step 8 ā Timeline of release milestones (components.timeline)
|
|
222
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
223
|
+
|
|
224
|
+
console.log(color.bold('šļø Release milestones:\n'));
|
|
225
|
+
|
|
226
|
+
console.log(components.timeline([
|
|
227
|
+
{ label: 'v1.0 ā Initial release', time: 'Jan 2025', done: true },
|
|
228
|
+
{ label: 'v1.5 ā TypeScript support', time: 'Mar 2025', done: true },
|
|
229
|
+
{ label: 'v2.0 ā Plugin system', time: 'Jul 2025', done: true },
|
|
230
|
+
{ label: 'v2.4 ā Current stable', time: 'Now', done: true },
|
|
231
|
+
{ label: 'v2.5 ā Templates marketplace', time: 'Q2 2026', done: false },
|
|
232
|
+
{ label: 'v3.0 ā AI-powered scaffolding', time: 'Q4 2026', done: false },
|
|
233
|
+
], { node: 'ā', connector: 'ā' }));
|
|
234
|
+
|
|
235
|
+
console.log();
|
|
236
|
+
await sleep(500);
|
|
237
|
+
|
|
238
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
239
|
+
// Step 9 ā Config preview with JSON pretty-print (json)
|
|
240
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
241
|
+
|
|
242
|
+
console.log(color.bold('āļø Generated configuration:\n'));
|
|
243
|
+
|
|
244
|
+
console.log(json.pretty({
|
|
245
|
+
name: 'my-app',
|
|
246
|
+
version: '0.1.0',
|
|
247
|
+
framework: 'react',
|
|
248
|
+
features: ['typescript', 'eslint', 'prettier', 'testing-library'],
|
|
249
|
+
scripts: {
|
|
250
|
+
dev: 'stardust dev',
|
|
251
|
+
build: 'stardust build',
|
|
252
|
+
test: 'stardust test',
|
|
253
|
+
},
|
|
254
|
+
meta: {
|
|
255
|
+
generatedBy: 'stardust',
|
|
256
|
+
generatedAt: '2026-06-13T10:00:00Z',
|
|
257
|
+
template: 'react-app-typescript',
|
|
258
|
+
},
|
|
259
|
+
}, { sortKeys: false }));
|
|
260
|
+
|
|
261
|
+
console.log();
|
|
262
|
+
await sleep(500);
|
|
263
|
+
|
|
264
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
265
|
+
// Step 10 ā Side-by-side panel layout (panels)
|
|
266
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
267
|
+
|
|
268
|
+
console.log(color.bold('š Quick stats:\n'));
|
|
269
|
+
|
|
270
|
+
const leftCard = ascii.box(
|
|
271
|
+
color.cyan('FILES\n') +
|
|
272
|
+
color.bold('42'),
|
|
273
|
+
{ borderStyle: 'rounded', padding: 1 },
|
|
274
|
+
);
|
|
275
|
+
|
|
276
|
+
const midCard = ascii.box(
|
|
277
|
+
color.magenta('LINES\n') +
|
|
278
|
+
color.bold('1,247'),
|
|
279
|
+
{ borderStyle: 'rounded', padding: 1 },
|
|
280
|
+
);
|
|
281
|
+
|
|
282
|
+
const rightCard = ascii.box(
|
|
283
|
+
color.green('TESTS\n') +
|
|
284
|
+
color.bold('38/38'),
|
|
285
|
+
{ borderStyle: 'rounded', padding: 1 },
|
|
286
|
+
);
|
|
287
|
+
|
|
288
|
+
console.log(panels.vsplit([leftCard, midCard, rightCard], { gap: 2 }));
|
|
289
|
+
|
|
290
|
+
console.log();
|
|
291
|
+
await sleep(500);
|
|
292
|
+
|
|
293
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
294
|
+
// Step 11 ā Frame animation finale (frames)
|
|
295
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
296
|
+
|
|
297
|
+
console.log();
|
|
298
|
+
|
|
299
|
+
const morphed = frames.morph('LOADING...', 'COMPLETE!', 16, 'āāāāāāā');
|
|
300
|
+
await frames.play(morphed, { interval: 70, loop: false }).promise;
|
|
301
|
+
|
|
302
|
+
console.log();
|
|
303
|
+
await sleep(400);
|
|
304
|
+
|
|
305
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
306
|
+
// Step 12 ā Pixel art + canvas finale (images)
|
|
307
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
308
|
+
|
|
309
|
+
console.log(color.bold('\nšØ Generated by stardust:\n'));
|
|
310
|
+
|
|
311
|
+
// A small banner with gradient rectangle + pixel art sprite
|
|
312
|
+
const canvas = createCanvas(50, 12, { r: 25, g: 25, b: 40 });
|
|
313
|
+
|
|
314
|
+
// Decorative frame
|
|
315
|
+
const cyan = { r: 0, g: 200, b: 255 };
|
|
316
|
+
const pink = { r: 255, g: 105, b: 180 };
|
|
317
|
+
const yellow = { r: 255, g: 220, b: 0 };
|
|
318
|
+
|
|
319
|
+
canvas.drawRect(0, 0, 50, 12, cyan, false); // border
|
|
320
|
+
canvas.drawCircle(10, 6, 3, pink, true);
|
|
321
|
+
canvas.drawCircle(40, 6, 3, yellow, true);
|
|
322
|
+
|
|
323
|
+
canvas.print();
|
|
324
|
+
|
|
325
|
+
console.log();
|
|
326
|
+
console.log(renderPixelArt(SPRITES.star.pixels, { scale: 2 }));
|
|
327
|
+
console.log();
|
|
328
|
+
|
|
329
|
+
await sleep(500);
|
|
330
|
+
|
|
331
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
332
|
+
// Step 13 ā Final animated gradient farewell
|
|
333
|
+
// āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
334
|
+
|
|
335
|
+
console.log();
|
|
336
|
+
const farewell = animateGradient(
|
|
337
|
+
'⨠Built with ansimax ā see you next time! āØ',
|
|
338
|
+
['#ff79c6', '#bd93f9', '#8be9fd', '#50fa7b', '#ffd93d'],
|
|
339
|
+
{
|
|
340
|
+
interval: 70,
|
|
341
|
+
cycles: 2,
|
|
342
|
+
duration: 600,
|
|
343
|
+
infinite: false,
|
|
344
|
+
},
|
|
345
|
+
);
|
|
346
|
+
|
|
347
|
+
await farewell.promise;
|
|
348
|
+
console.log('\n');
|
|
349
|
+
|
|
350
|
+
console.log(panels.frame(
|
|
351
|
+
color.brightBlack(' npm install ansimax | github.com/Brashkie/ansimax '),
|
|
352
|
+
{ title: ' Get started ', padding: 1 },
|
|
353
|
+
));
|
|
354
|
+
|
|
355
|
+
console.log();
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## šÆ What this showcase demonstrates
|
|
361
|
+
|
|
362
|
+
| Module | Where it's used |
|
|
363
|
+
|---|---|
|
|
364
|
+
| `color` | Status messages, table cells, stats cards |
|
|
365
|
+
| `gradient` | Header banner, animated farewell |
|
|
366
|
+
| `ascii` | Figlet banner, boxes for stats cards |
|
|
367
|
+
| `animate` | Typewriter intro lines |
|
|
368
|
+
| `loader` | Spinner + hierarchical tasks pipeline |
|
|
369
|
+
| `components` | Status messages, badges, table, timeline |
|
|
370
|
+
| `themes` | Theme listing + switching |
|
|
371
|
+
| `trees` | Project structure visualization |
|
|
372
|
+
| `frames` | Morph animation for "LOADING ā COMPLETE" |
|
|
373
|
+
| `images` | Canvas drawing + sprite rendering |
|
|
374
|
+
| `panels` | Three-column stats layout, centering header, frame footer |
|
|
375
|
+
| `json` | Generated config display |
|
|
376
|
+
|
|
377
|
+
---
|
|
378
|
+
|
|
379
|
+
## š ļø Customizing the showcase
|
|
380
|
+
|
|
381
|
+
Want to use this as a starter for your own CLI? Here's what to change:
|
|
382
|
+
|
|
383
|
+
1. **Replace `STARDUST` banner** with your own brand name
|
|
384
|
+
2. **Edit `intro` lines** to describe your tool's startup process
|
|
385
|
+
3. **Replace the build task list** with your actual workflow steps
|
|
386
|
+
4. **Update the config JSON** with your tool's real output format
|
|
387
|
+
5. **Swap pixel art sprite** with your logo (use `SPRITES.heart`, `SPRITES.crown`, etc., or build a custom one)
|
|
388
|
+
|
|
389
|
+
The structure is intentionally generic ā any code-generation, build, deploy, or scaffolding tool can adapt this pattern.
|
|
390
|
+
|
|
391
|
+
---
|
|
392
|
+
|
|
393
|
+
## šÆ Next steps
|
|
394
|
+
|
|
395
|
+
- **Back to docs index?** ā [`README.md`](./README.md)
|
|
396
|
+
- **TypeScript examples?** ā [`examples-ts.md`](./examples-ts.md)
|
|
397
|
+
- **ESM examples?** ā [`examples-mjs.md`](./examples-mjs.md)
|
|
398
|
+
- **CommonJS examples?** ā [`examples-cjs.md`](./examples-cjs.md)
|
package/examples/all-in-one.cjs
CHANGED
|
@@ -118,7 +118,7 @@ async function main() {
|
|
|
118
118
|
console.log(components.section('š·ļø Badges & Status', { width: 60 }));
|
|
119
119
|
console.log();
|
|
120
120
|
console.log(' ',
|
|
121
|
-
components.badge('VERSION', 'v1.3.
|
|
121
|
+
components.badge('VERSION', 'v1.3.2'),
|
|
122
122
|
components.badge('BUILD', 'passing'),
|
|
123
123
|
components.badge('LICENSE', 'Apache 2.0'));
|
|
124
124
|
console.log();
|
package/examples/all-in-one.mjs
CHANGED
|
@@ -117,7 +117,7 @@ console.log();
|
|
|
117
117
|
console.log(components.section('š·ļø Badges & Status', { width: 60 }));
|
|
118
118
|
console.log();
|
|
119
119
|
console.log(' ',
|
|
120
|
-
components.badge('VERSION', 'v1.3.
|
|
120
|
+
components.badge('VERSION', 'v1.3.2'),
|
|
121
121
|
components.badge('BUILD', 'passing'),
|
|
122
122
|
components.badge('LICENSE', 'Apache 2.0'));
|
|
123
123
|
console.log();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ansimax",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "Zero-dependency CLI rendering library: colors, gradients, animations, ASCII art, pixel art, components, and themes \u2014 all in TypeScript.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -93,6 +93,7 @@
|
|
|
93
93
|
"files": [
|
|
94
94
|
"dist",
|
|
95
95
|
"examples",
|
|
96
|
+
"docs",
|
|
96
97
|
"README.md",
|
|
97
98
|
"README.es.md",
|
|
98
99
|
"CHANGELOG.md",
|