0.0.1-alpha.19 • Published 2 years ago

@lingxiteam/bundle-less-theme-tools v0.0.1-alpha.19

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

bundle-less-theme-tools

A tool for bundling less theme files.

Install

$ npm install -D @lingxiteam/bundle-less-theme-tools

or

$ yarn add -D @lingxiteam/bundle-less-theme-tools

Export

  • bundleLessTheme:read and resolve import path in less theme file, and output all
  • miniLessTheme
  • replaceLessTheme

Usage

let themeBundle = '';
let themeFileEntryPath = 'xxx/xxx/xxx.less';

themeBundle = bundleLessTheme(themeFileEntryPath);

themeBundle = replaceLessTheme(themeBundle, {
   'body {': '.unuse-body {'
});

themeBundle = miniLessTheme(themeBundle);