is there a coffeescript auto compile / file watcher for windows?

前端 未结 9 2193
攒了一身酷
攒了一身酷 2021-02-19 16:01

I\'d like to play around with integrating coffeescript into my dev process. But as I see it, I\'ll have to make a bat file that iterates a set of coffee files and spits out js f

相关标签:
9条回答
  • 2021-02-19 17:00

    Here is the best way to do it: Say your work is in "my-project-path" folder.

    1. Go to the parent folder of "my-project-path"
    2. Start a terminal and type coffee -o my-project-path -cw my-project-path

    This line will watch and compile anything name as "*.coffee" in "my-project-path" folder, even if it is in "my-project-path/scripts/core" or "my-project-path/test/core".The js file will locate in the save folder as the .coffee file.

    0 讨论(0)
  • 2021-02-19 17:01

    Personally, I prefer using build tools like grunt.js / yeoman or brunch for that purpose.

    grunt.js & grunt coffee

    0 讨论(0)
  • 2021-02-19 17:02

    I think there is a simplier way just using -w option of coffeescript compiler

    coffee -c -w *.coffee

    This will compile all coffee files under the folder you are (put more file pathes if needed) each time you change one.

    0 讨论(0)
提交回复
热议问题