如何制作滚动CLI手表。包括多个文件或目录?
我正在开始观看使用的汇总过程:
npx rollup -c rollup.config.js --watch --watch.include=js/**
但是现在我想添加一个我也想观看的第二个目录:样式/**
chan i如何更改命令,以便 js
和样式
目录正在观察?
I'm starting a rollup process with watching using:
npx rollup -c rollup.config.js --watch --watch.include=js/**
But now I want to add a second directory that I want to watch as well: styles/**
How chan I change the command so that both the js
and styles
directories are being watched?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
编辑:这似乎不再适用于较新版本的汇总。相反,我现在只添加
到汇总配置中。
旧答案:
如果您是通过
lolup.config.json
配置观察者“ rel =“ nofollow noreferrer”>watch.include
属性。但是在CLI上这不是一个选择。但是,您可以更改命令中的环模式,使其包含多个模式(请参见此答案)。
那么您的命令将成为:
edit: this no longer seems to work with a newer version of rollup. Instead I now simply add
to the rollup config.
old answer:
If you are configuring your watcher from your
rollup.config.json
you could simply use an array for thewatch.include
property. But on the CLI this is not an option.You could, however, change the glob pattern in the command so that it contains multiple patterns (see this answer).
Then your command would become: