create-ui0 0.1.6 → 0.1.7
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
CHANGED
|
@@ -228,12 +228,13 @@ const run = async () => {
|
|
|
228
228
|
const nuxtConfigPath = path.join(target, 'nuxt.config.ts');
|
|
229
229
|
const withIcons = features.includes('icon');
|
|
230
230
|
const configSrc = readFileSync(nuxtConfigPath, 'utf8')
|
|
231
|
-
.replace('/* FEATURE_VITE_IMPORT */', withIcons ? "import
|
|
231
|
+
.replace('/* FEATURE_VITE_IMPORT */', withIcons ? "import ViteUi0Icon from '@ui0/icon/vite'\n" : '')
|
|
232
232
|
.replace('/* FEATURE_VITE_PLUGINS */',
|
|
233
|
-
//
|
|
234
|
-
//
|
|
235
|
-
//
|
|
236
|
-
|
|
233
|
+
// dir is the scan root - an svg at <dir>/icons/bookmark.svg is
|
|
234
|
+
// addressed 'assets/icons/bookmark'. Relative dirs resolve against
|
|
235
|
+
// the vite root, walking up to the project root when missing (nuxt
|
|
236
|
+
// roots vite at app/)
|
|
237
|
+
withIcons ? "ViteUi0Icon({ dir: './assets' })" : '')
|
|
237
238
|
.replace('/* FEATURE_CSS */',
|
|
238
239
|
// the placeholder trails the array's first entry - lead with a comma
|
|
239
240
|
picked.length ? `,\n ${picked.flatMap((f) => f.cssLines ?? []).join(',\n ')}` : '');
|
package/package.json
CHANGED