Skip to content

Export JS theme colors to CSS custom properties

License

Notifications You must be signed in to change notification settings

ockam/export-theme-colors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This script will export UI library theme colors to CSS custom properties.

Has been tested with TailwindCSS (tailwind.config.js) and Chakra UI (theme.js).

Use npm run start or node index.js to run.

If using npm with arguments, add -- before arguments:

  npm run start -- -t "ck"

Arguments:

  • --themeType: string tw | ck (default: "tw")
  • --themeFile: string filename (default: "./tailwind.config.js")
  • --themeColors: string theme object path (default: "theme.colors")
  • --cssFile: string filename (default: "./custom-properties.css")
  • --prefix: string (default: "")

Aliases:

  • -t: --themeType
  • -f: --themeFile
  • -c: --themeColors
  • -o: --cssFile
  • -p: --prefix