Is there a way to add an exception to the require_tree in a manifest file?

后端 未结 2 1868
温柔的废话
温柔的废话 2021-01-01 14:27

Is there a way you can include all files in a directory except one, or all directories except one? So something like:

require_tree . :except \'this_one\'
         


        
2条回答
  •  有刺的猬
    2021-01-01 14:47

    Depending on the version of your environment the following may be possible:

    //= require_tree "." exclude: "file1", "file2"
    

    See this SO thread: Rails 3.1 Sprockets require directives - is there a way to exclude particular files?. Never tried it myself, though.

提交回复
热议问题