feat: 增加组件库

This commit is contained in:
ningmengchongshui 2024-06-16 11:29:47 +08:00
parent 48f9f59e5e
commit 2c7692ddc3
3 changed files with 34 additions and 8 deletions

View File

@ -1,7 +1,25 @@
import { exec } from 'child_process'
import { spawn } from 'child_process'
/**
* **********
* css文件
* **********
*/
exec('tailwindcss -i ./src/input.css -o ./public/output.css --watch')
// exec('')
const child = spawn(
'tailwindcss -i ./src/input.css -o ./public/output.css --watch',
[],
{
shell: true,
stdio: 'inherit'
}
)
/**
* *************
* exit
* *************
*/
process.on('SIGINT', () => {
if (child.pid) process.kill(child.pid)
if (process.pid) process.exit()
})

View File

@ -55,12 +55,12 @@
"@rollup/plugin-typescript": "^11.1.3",
"@types/inquirer": "^9.0.7",
"@types/koa": "^2.15.0",
"@types/koa-mount": "^4.0.5",
"@types/koa-router": "^7.4.8",
"@types/koa-static": "^4.0.4",
"@types/lodash": "^4.14.200",
"@types/node": "^20.8.5",
"@types/node-schedule": "^2.1.7",
"@types/koa-mount": "^4.0.5",
"@types/react-dom": "^18.2.22",
"@types/redis": "^4.0.11",
"@types/ws": "^8.5.7",
@ -74,6 +74,7 @@
"koa-router": "^12.0.1",
"koa-static": "^5.0.0",
"nodemon": "^3.0.1",
"preline": "^2.3.0",
"prettier": "^3.0.3",
"rollup": "^4.16.4",
"tailwindcss": "^3.4.3",

View File

@ -1,10 +1,17 @@
import { createRequire } from 'module'
const require = createRequire(import.meta.url)
/**
* @type {import('tailwindcss').Config}
*/
export default {
content: ['./plugins/**/*.{jsx,tsx}', './example/**/*.{jsx,tsx}'],
theme: {
extend: {}
},
plugins: []
/**
* 仅对plugins目录下的jsxtsxhtml文件生效
*/
content: ['./plugins/**/*.{jsx,tsx,html}'],
/**
* 并不加入preline的js逻辑
* 需要开发并使用js交互效果
* 请自行建立独立的web环境
*/
plugins: [require('preline/plugin')]
}