webstorm监视子目录,并且编译以后的文件保持源文件的目录结构


我的项目目录是以下这种结构
图片描述

我希望webstorm的监视器能帮我监视coffee下的所有.coffee,
同时希望编译后的js能保持一致的目录结构.

webstorm node.js 前端

wxhfree 10 years, 9 months ago

有很多办法,当然最 WebStorm 的办法就是使用 macro。

先假设

  • coffee 目录 /frontEndDir/coffee/
  • javascript 目录 /frontEndDir/coffee/

那么打开 Preference -> Tools -> File Watchers 双击你的 coffee watcher 进行编辑。在 Arguments 中输入 --output $ProjectFileDir$/frontEndDir/js/$FileDirPathFromParent(coffee)$ --map --compile $FileName$

完成,求赞求关注。

进去切咖啡 answered 10 years, 9 months ago

Your Answer