@mevbg/design-essentials-vendor 2.0.2 β†’ 2.0.4

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.
Files changed (3) hide show
  1. package/LICENSE +15 -0
  2. package/README.md +39 -24
  3. package/package.json +1 -1
package/LICENSE ADDED
@@ -0,0 +1,15 @@
1
+ ISC License
2
+
3
+ Copyright (c) 2025, Martin Metodiev
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
package/README.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  > A simple vendor of design system essentials
4
4
 
5
+ [![npm version][npm-version-src]][npm-version-href]
6
+ [![License][license-src]][license-href]
7
+ [![Style Dictionary][style-dictionary-src]][style-dictionary-href]
8
+
5
9
  ## 🎯 Overview
6
10
 
7
11
  _[Mev](https://mev.bg)’s Design Essentials Vendor_ (**mDEV**) is a full-fledged factory for generating essential assets used to scaffold a robust Design System. Built on top of [Style Dictionary](https://styledictionary.com/) and [Favicons](https://www.npmjs.com/package/favicons), it delivers a strongly opinionated and production-ready foundation of assets, tokens and utilities β€” aligned with Mev’s principle for creating resilient and stable UIs.
@@ -279,24 +283,24 @@ It is primarily utilized by the Viewport Scaler Generator and Tokens Generator,
279
283
  #### Usage of Master Generator
280
284
 
281
285
  ```ts
282
- import { generateDesignEssentials } from ’@mevbg/design-essentials-vendor’;
286
+ import { generateDesignEssentials } from '@mevbg/design-essentials-vendor';
283
287
 
284
288
  try {
285
289
  await generateDesignEssentials({
286
- buildPath: ’./dist’,
287
- prefix: ’mev’,
290
+ buildPath: './dist',
291
+ prefix: 'mev',
288
292
  baseFontSize: 16,
289
293
  generators: {
290
294
  favicons: {
291
- id: ’https://mev.bg’,
292
- sourcePath: ’assets/images/logo.svg’,
293
- appName: ’Mev.bg’,
294
- appShortName: ’Mev’,
295
- appDescription: ’Personal webpage’,
296
- version: ’1.0.0’
295
+ id: 'https://mev.bg',
296
+ sourcePath: 'assets/images/logo.svg',
297
+ appName: 'Mev.bg',
298
+ appShortName: 'Mev',
299
+ appDescription: 'Personal webpage',
300
+ version: '1.0.0'
297
301
  },
298
302
  fontFaces: {
299
- sourcePath: ’assets/client/fonts’,
303
+ sourcePath: 'assets/client/fonts',
300
304
  fonts: {
301
305
  Helvetica: {
302
306
  Regular: 400,
@@ -305,35 +309,35 @@ try {
305
309
  }
306
310
  },
307
311
  icons: {
308
- fontFamily: ’MevIcons’,
309
- color: ’var(--mev-color-content-gray)’,
312
+ fontFamily: 'MevIcons',
313
+ color: 'var(--mev-color-content-gray)',
310
314
  list: {
311
- main: ’E000’,
312
- nav: ’E001’,
313
- search: ’E002’,
314
- profile: ’E003’
315
+ main: 'E000',
316
+ nav: 'E001',
317
+ search: 'E002',
318
+ profile: 'E003'
315
319
  // ...
316
320
  },
317
321
  viewportScaler: {},
318
322
  scrollbar: {},
319
323
  tokens: {
320
- sourcePath: ’./design/tokens/**/index.js’,
321
- platforms: [’css’, ’js’, ’scss’],
324
+ sourcePath: './design/tokens/**/index.js',
325
+ platforms: ['css', 'js', 'scss'],
322
326
  contentScaling: {
323
327
  minViewportW: 600,
324
328
  maxViewportW: 1200
325
329
  },
326
330
  colorScheme: {
327
- default: ’light’,
328
- method: ’combined’
331
+ default: 'light',
332
+ method: 'combined'
329
333
  }
330
334
  }
331
335
  }
332
336
  }
333
337
  });
334
- console.info(’Design essentials generated successfully!’);
338
+ console.info('Design essentials generated successfully!');
335
339
  } catch (err) {
336
- console.error(’Failed to generate design essentials:’, err.message);
340
+ console.error('Failed to generate design essentials:', err.message);
337
341
  }
338
342
  ```
339
343
 
@@ -1509,7 +1513,7 @@ This generator automatically scans font directories and generates comprehensive
1509
1513
  - **Process**:
1510
1514
  1. Calls `getTypefaces(sourcePath)` to discover available fonts
1511
1515
  2. For each typeface, checks if there’s a predefined weight mapping in the `fonts` config
1512
- 3. If no mapping exists and multiple weights are detected, skips the typeface (can't determine weights)
1516
+ 3. If no mapping exists and multiple weights are detected, skips the typeface (can’t determine weights)
1513
1517
  4. Sorts weights by their numeric values if mapping exists
1514
1518
  5. Filters files to ensure only `.woff2` files are processed
1515
1519
  6. Creates FontFace objects with:
@@ -1613,7 +1617,7 @@ This generator leverages the `favicons` npm package to create comprehensive favi
1613
1617
  2. Merges default parameters with provided parameters using spread operator
1614
1618
  3. Sets `manifestMaskable` to `sourcePath` if not provided (uses same image for maskable icons)
1615
1619
  4. Resolves the build path using `path.resolve()` for absolute path
1616
- 5. Creates the output directory if it doesn't exist using `fs.mkdir()` with `recursive: true`
1620
+ 5. Creates the output directory if it doesn’t exist using `fs.mkdir()` with `recursive: true`
1617
1621
  6. Calls the `favicons()` function from the favicons package with `sourcePath` and `config`
1618
1622
  7. Uses `Promise.all()` to handle concurrent file writing operations:
1619
1623
  - **Image files**: Maps through `faviconsResult.images` array
@@ -2333,3 +2337,14 @@ favicons/
2333
2337
 
2334
2338
  This is a personal tool and no contributions are expected.
2335
2339
  At least for now. πŸ˜‹
2340
+
2341
+
2342
+ <!-- Badges -->
2343
+ [npm-version-src]: https://img.shields.io/npm/v/%40mevbg%2Fdesign-essentials-vendor/latest.svg?style=flat&colorA=020420&colorB=00DC82
2344
+ [npm-version-href]: https://npmjs.com/package/@mevbg/design-essentials-vendor
2345
+
2346
+ [license-src]: https://img.shields.io/npm/l/%40mevbg%2Fdesign-essentials-vendor.svg?style=flat&colorA=020420&colorB=00DC82
2347
+ [license-href]: https://github.com/mevbg/design-essentials-vendor/blob/main/LICENSE
2348
+
2349
+ [style-dictionary-src]: https://img.shields.io/badge/Style%20Dictionary-%5E5.0.1-3fc6c0?colorA=020420
2350
+ [style-dictionary-href]: https://styledictionary.com
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mevbg/design-essentials-vendor",
3
3
  "title": "Design Essentials Vendor",
4
- "version": "2.0.2",
4
+ "version": "2.0.4",
5
5
  "description": "Mev’s personal vendor of design system essentials.",
6
6
  "keywords": [
7
7
  "design essentials vendor",