0.0.2 • Published 3 years ago

@alitajs/plugin-theme v0.0.2

Weekly downloads
12
License
MIT
Repository
github
Last release
3 years ago

@alitajs/plugin-theme

you can change Ant Design (or Ant Design Mobile) specific color theme in browser.

Install

  • yarn add @alitajs/plugin-theme

config/config.ts

  plugins:['@alitajs/plugin-theme'],
  dynamicTheme:{
    type:'antd-mobile',
    varFile: path.join(__dirname, '../src/default.less'),
    themeVariables: ['@brand-primary','@abcd-efg'],
  }
PropertyTypeDefaultDescript
antDirstring-This is path to antd directory in your node_modules
varFilestring-Path to your theme related variables file
themeVariablesarray'@primary-color'List of variables that you want to dynamically change
generateOncebooleanfalseEverytime webpack will build new code due to some code changes in development, this plugin will run again unless you specify this flag as true which will just compile your styles once
outputFileNamestringcolor.lessless var file name