prisma-json-types-generator 在 WebStorm 中使用
定义了如下类型,但是 WebStorm Code Complete 无法正确提示类型,只有加上 export 才能正确处理。
fix(eslint): @typescript-eslint/no-use-before-define settings
React Buddy
好用的插件,https://react-buddy.com/
:youtube{#rg80JMm-E1I}
nodejs 如何执行 shell 命令,并把结果实时回显输出?
nodejs 如何执行 shell 命令,并把结果实时回显输出?
我尝试如上写法,但是发现回调函数 (error, stdout, stderr)=>{} 在命令执行完毕才一次性返回, 而不是实时回显
请问如何让输出实时回显?
你需要用 spawn, 它是一个事件触发器对象版本的 exec, 以下例子来自 node 官方文档:
https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options
使用 spawn 可能出现的问题
simply adding shell: true option solved my problem:
incorrect:
correct:
based on Node.js Documentation (thank to @Boris comment):
Note that:
if the shell option is enabled, do not pass unsanitized user input to this function. Any input containing shell metacharacters may be used to trigger arbitrary command execution.
关于在 WebStorm 中使用 MUI 极其卡顿的问题
One more note: If you experience UI freezes while using tag completion, as a workaround, you can try to disable "Preferences | Editor | General | Smart Keys | HTML/CSS" -> "Insert required attributes on tag completion" (and may be other similar options in the settings). I am not sure that this will fix the problem completely, but at least it should reduce the freezes.
Initial HTTP proxy support for Copilot
给 copilot-proxy.githubusercontent.com 设置分流
shadowrocket 分流
- 配置里面添加代理分组
- 配置里面规则下设置策略