css-generator-plugin
css file generator only write class name
2,502
28
| Install | |
|---|---|
npm install css-generator-plugin |
|
| Latest Version: | 2.5.8 |
| License: | MIT |
| Last Updated: | Jul 28, 2023 |
| Links: | GitHub · npm |
Maintainer: machete-jhun
css-generator-plugin 自动生成css文件,高效开发页面
在线尝试
更新记录
如何使用
-
安装依赖
webpack 小程序用户
npm i css-generator-plugin -D or yarn add css-generator-plugin -Dwebpack配置
const CssGeneratorPlugin = require('css-generator-plugin') { // ... other config settings plugins: [ new CssGeneratorPlugin() ] };在项目入口文件中引入 生成的css
import '@/style/auto.css'
vite 用户
npm i vite-plugin-css-generator -D or yarn add vite-plugin-css-generator -Dvite 配置
import CssGenerator from 'vite-plugin-css-generator' export default defineConfig({ // ... other config settings plugins:[ CssGenerator() ] })在项目入口文件中引入 生成的css
import '@/style/auto.css'
生成器 用户
npm i css-generator-script or yarn add css-generator-script项目入口中引用
// Gcss(<配置项>) 写入配置项 import Gcss from 'css-generator-script' new Gcss({}).start()
CDN 引入
<html> <head> <script src="https://cdn.jsdelivr.net/npm/css-generator-script/gcss.js"></script> </head> <body> </body> <script> // {} is config new window.Gcss({}).start() </script> </html>
生成代码提示文件
将会在根目录生成 auto-use-snippets.css 作为代码提示文件
npx gen-snippets
or
yarn gen-snippets
配置项
webpack 或 vite 用户请 下载本项目中配置文件 .css.generator.js 到项目根目录
cdn 或生成器用户 请在 函数中传入配置
### 命令行启动(如小程序类和老项目,无webpack)
+ 运行指令
```text
npx css-generator
or
yarn css-generator
规则说明与进阶使用
Related Packages
component-css-extractor
Extract CSS from any scoped styles in a component framework. In the browser.
6,916
38
the-themex-project
Themex aims to prevent a blank screen in your IDE and serves as a solid foundati...
7,230
18
hy-event-store
A zero-dependency event bus and global state store for Vue, React, Mini Programs...
1,342
411
domagic-webpack-plugin
A development-only Webpack plugin for DOM source mapping and AI-assisted style e...
7,002
eslint-plugin-css
An ESLint plugin that provides rules to verify CSS definition objects.
1,534,660
72
Version History
| Version | Released | License |
|---|---|---|
| 2.5.8 | MIT | |
| 2.5.7 | MIT | |
| 2.5.6 | MIT | |
| 2.5.5 | MIT | |
| 2.5.4 | MIT | |
| 2.5.3 | MIT | |
| 2.5.2 | MIT | |
| 2.5.1 | MIT | |
| 2.5.0 | MIT | |
| 2.4.0 | MIT | |
| 2.3.92 | MIT | |
| 2.3.91 | MIT | |
| 2.3.9 | MIT | |
| 2.3.8 | MIT | |
| 2.3.7 | MIT | |
| 2.3.6 | MIT | |
| 2.3.5 | MIT | |
| 2.3.4 | MIT | |
| 2.3.3 | MIT | |
| 2.3.2 | MIT | |
| 2.3.1 | MIT | |
| 2.3.0 | MIT | |
| 2.2.0 | MIT | |
| 2.1.9 | MIT | |
| 2.1.8 | MIT | |
| 2.1.7 | MIT | |
| 2.1.6 | MIT | |
| 2.1.5 | MIT | |
| 2.1.4 | MIT | |
| 2.1.3 | MIT |
Showing the latest 30 of 88. See every release on npm
Pre-releases (11)
| Version | Released | License |
|---|---|---|
| 2.0.5-beta | MIT | |
| 2.0.4-beta | MIT | |
| 2.0.3-beta | MIT | |
| 2.0.2-beta | MIT | |
| 2.0.1-beta | MIT | |
| 2.0.0-beta | MIT | |
| 0.20.2-beta.3 | MIT | |
| 0.20.2-beta.2 | MIT | |
| 0.20.2-beta.1 | MIT | |
| 0.20.1-beta.4 | MIT | |
| 0.20.1-beta.3 | MIT |