我试图删除所有.dot
文件,除了.git
和所有*.js
除一人外exception.js
,但我失败
git clone git@github.com:iamstarkov/rimraf-test.git cd rimraf-test
npm test # it fails
有谁能够帮助我?
var globby = require('globby'); var rimraf = require('rimraf'); globby(['*', '!authors.js', '!.git', '!dump']) .then(function then(paths) { paths.map(function map(item) { rimraf.sync(item); }); });