0.0.11 • Published 5 months ago

luckybeard v0.0.11

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

Luckybeard CLI

Luckybeard CLI is a cli tool-chain specifically created to assist developers. It makes use of various tools

Installation

Install Luckybeard CLI with npm

  npm install -g luckybeard

Usage/Examples

luckybeard list-components
luckybeard generate-components

Disclaimer

luckybeard is used as-is and the author takes no responsibility for any loss or damages.

Implementation steps

  • 1st the responsive object will contain all of its modes right before the final value, i.e. responsive.screen.breakpoints = {desktop: 123, mobile: 11} instead of responsive.screen.breakpoints = 12
  • Once that object is built when generating the types, take the current version of the object, find the responsive key and each of its descendants that contain all of the modes as a child, then set the value equal to the first child so that we can determine the type correctly
  • generate the types using the temporary object theming.d.ts
  • now let's generate a ts export which is theme: ThemeType = {} and replace each of its values with its css selector equivalent
  • generate a css file - each theme has its own data-theme="mode" selector with nested media queries for responsiveness.
  • generate a css file containing all of the media queries for the responsive objects
  • make sure that font names can work as Figree instead of "Figtgree", we might have to generate string values as strings with quotes

Future optimizations

  • optimize css generation by reducing media queries
  • generate css snippets or look at other means of intellisense when writing out css within css/scss files
  • tidy up functions and move them out to other files as theming/index.ts has become quite bloated
  • look at error handling during css generation
  • write tests to validate that output is correct
  • add better type support for things like modes, figma variables etc.
0.0.10

5 months ago

0.0.11

5 months ago

0.0.9

5 months ago

0.0.8

6 months ago

0.0.5

6 months ago

0.0.7

6 months ago

0.0.6

6 months ago

0.0.4

8 months ago

0.0.3

8 months ago

0.0.2

8 months ago