CoffeeScript - compile all .coffee files in current directory and all sub-directories

后端 未结 4 1140
离开以前
离开以前 2021-02-05 04:06

What is the easiest way to compile all .coffee files in the current directory and all sub-directories?

4条回答
  •  梦谈多话
    2021-02-05 05:03

    coffee --watch --compile .
    

    or

    coffee -wc .
    

    Either of these commands will run forever, watching for *.coffee files in the current directory, and compiling those *.coffee files into *.js JavaScript files whenever the *.coffee files are changed.

    If you want the *.js files to be generated into some other directory, just add --output or -o, like this:

    coffee --watch --output lib --compile src
    

    or

    coffee -w -o lib -c src
    

提交回复
热议问题