Miao-Yunzai/image/tailwindcss.ts

26 lines
405 B
TypeScript
Raw Normal View History

2024-06-16 11:29:47 +08:00
import { spawn } from 'child_process'
2024-06-10 14:10:09 +08:00
/**
* **********
* css文件
* **********
*/
2024-06-16 11:29:47 +08:00
// 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()
})