vnojs
v1.2.7
Published
vnojs,dymatic class,dymatic style
Downloads
28
Readme
vnojs只需两条命令即可完成配置
动态css规格,unocss的精简版,全文css搜索,创建匹配规则的css
- 重要更新,自1.1.7开始,本插件支持es模块导入
使用方法
传统方法
- 安装vnojs
yarn add vnojs / npm install vnojs / pnpm add vnojs ...
- 初始化配置文件
npx vno init
将在运行目录下生成一个vno.config.js配置文件
如果es模块系统,使用下面这个脚本
npx vnoes init
按需修改配置文件
编译并监听文件夹
npx vno start
使用脚本
{
"scripts": {
"vno:start": "vno init && vno start -w src -e vue -t src/assets/vno.css"
}
}
如果项目中用type:module 限制了项目模块系统,则使用下面这个脚本
{
"scripts": {
"vno:start": "vnoes init && vnoes start -w src -e vue -t src/assets/vno.css"
}
}
在程序中使用
const vno = require("vno")
const config = require("vno.config.js") // your vno config
vno(config)
.then(() => {
console.log("编译完成,开始监听文件夹")
})
.catch(err => {
console.error(err)
})
es导入方式
import vno from "vno"
import config from "./vno.config.js" // your vno config
vno(config)
.then(() => {
console.log("编译完成,开始监听文件夹")
})
.catch(err => {
console.error(err)
})
获取帮助
npx vno --help
npx vno init --help
npx vno start --help
vnoes帮助
npx vnoes --help
npx vnoes init --help
npx vnoes start --help