sdaia-ui 1.0.0 → 1.0.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/dist/index.js +9 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -371,10 +371,18 @@ function transformImports(source, componentDir, utilsDir, componentName) {
|
|
|
371
371
|
/from\s+(['"])\.\.\/\.\.\/lib\/cn\1/g,
|
|
372
372
|
`from '${cnImportPath}'`
|
|
373
373
|
);
|
|
374
|
+
result = result.replace(
|
|
375
|
+
/^([ \t]*)import\s+([A-Za-z_$][\w$]*)\s+from\s+(['"])\.\.\/\.\.\/icons\/[^'"]+\3\s*;?/gm,
|
|
376
|
+
`$1import { $2 } from 'sdaia-ui/icons';`
|
|
377
|
+
);
|
|
374
378
|
result = result.replace(
|
|
375
379
|
/from\s+(['"])\.\.\/\.\.\/icons\/[^'"]+\1/g,
|
|
376
380
|
`from 'sdaia-ui/icons'`
|
|
377
381
|
);
|
|
382
|
+
result = result.replace(
|
|
383
|
+
/^([ \t]*)import\s+([A-Za-z_$][\w$]*)\s+from\s+(['"])\.\.\/\.\.\/hooks\/[^'"]+\3\s*;?/gm,
|
|
384
|
+
`$1import { $2 } from 'sdaia-ui/hooks';`
|
|
385
|
+
);
|
|
378
386
|
result = result.replace(
|
|
379
387
|
/from\s+(['"])\.\.\/\.\.\/hooks\/[^'"]+\1/g,
|
|
380
388
|
`from 'sdaia-ui/hooks'`
|
|
@@ -511,7 +519,7 @@ async function add(componentSlugs, options) {
|
|
|
511
519
|
|
|
512
520
|
// src/index.ts
|
|
513
521
|
var program = new Command();
|
|
514
|
-
program.name("sdaia-ui").description("Install SDAIA Design System components into your project").version("1.0.
|
|
522
|
+
program.name("sdaia-ui").description("Install SDAIA Design System components into your project").version("1.0.2");
|
|
515
523
|
program.command("init").description("Initialize your project for SDAIA Design System components").action(init);
|
|
516
524
|
program.command("add").description("Add components to your project").argument("<components...>", "Component names (e.g. button modal tag)").option("--overwrite", "Overwrite existing components", false).action((components, options) => {
|
|
517
525
|
add(components, options);
|