@svgrid/ui 0.3.0 → 0.3.1
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/index.mjs +10 -2
- package/package.json +2 -2
package/index.mjs
CHANGED
|
@@ -378,11 +378,19 @@ async function cmdAdd(registry, tokens, args) {
|
|
|
378
378
|
}
|
|
379
379
|
}
|
|
380
380
|
|
|
381
|
-
//
|
|
381
|
+
// Next steps: how to USE it (code) and how to SEE it (try / --preview).
|
|
382
382
|
const first = items[0]
|
|
383
383
|
stdout.write(`\n${color('green', '✔')} Added ${written.length} file(s). They're yours - edit away.\n`)
|
|
384
384
|
if (first) {
|
|
385
|
-
stdout.write(` ${color('dim', 'Use it:')}
|
|
385
|
+
stdout.write(` ${color('dim', 'Use it:')} import { ${exportName(first.id)} } from '@svgrid/grid'\n`)
|
|
386
|
+
// "See it" - skip when we already wrote preview routes just above.
|
|
387
|
+
if (!(args.preview && isSvelteKit(projectRoot))) {
|
|
388
|
+
const ids = items.map((it) => it.id).join(' ')
|
|
389
|
+
stdout.write(` ${color('dim', 'See it:')} ${color('cyan', `npx @svgrid/ui try ${ids}`)} ${color('dim', '(opens in your browser)')}\n`)
|
|
390
|
+
if (isSvelteKit(projectRoot)) {
|
|
391
|
+
stdout.write(` ${color('dim', 'In app:')} re-run with ${color('cyan', '--preview')} to add a /preview/${first.id} route\n`)
|
|
392
|
+
}
|
|
393
|
+
}
|
|
386
394
|
}
|
|
387
395
|
stdout.write(`\n${color('dim', 'Docs:')} https://www.svgrid.com/docs/help/ui-components\n\n`)
|
|
388
396
|
}
|
package/package.json
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"type": "commercial",
|
|
5
5
|
"url": "https://svgrid.com/pricing"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.3.
|
|
8
|
-
"description": "Add SvGrid UI components
|
|
7
|
+
"version": "0.3.1",
|
|
8
|
+
"description": "Add and preview SvGrid UI components in one command: npx @svgrid/ui try calendar",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"author": "jQWidgets Ltd",
|