node-glob匹配所有非js文件该怎么写?

使用node-glob匹配文件,匹配到所有非js文件,该怎么写?

阅读 4.4k
2 个回答
glob("**/!(*.js)", function (er, files) {
    console.log(files)
})
!(pattern|pattern|pattern) Matches anything that does not match any of the patterns provided.

Glob Primer

推荐问题