Closed ingro closed 9 years ago
Thanks for reporting this, I will change the patterns to fix it.
Fixed and published in version 1.2.2
Thank you sir :)
Still an issue for me in 1.2.7, see https://github.com/KyleRoss/modclean/issues/8
This is still an issue as React Router depends on the package history. Should history just be moved to danger. As ReactRouter is a popular repo.
Until then, I ended up creating a file called '.modclean.js' in the root of my project.
const modclean = require('modclean');
modclean({
cwd: './src',
patterns: [modclean.patterns.safe, modclean.patterns.caution, modclean.patterns.danger],
process: (file, files) => !file.match(/history/i)
})
And
node ./.modclean
As a postinstall hook, or during a production build.
Hello! Thanks for your script, I find it very useful especially now that I'm using it while building an Electron app. Anyway I have this small problem with the React Router library, since they have a file named
History.js
, and so after runningmodclean
the entire app breaks.I understand that "history" is a common name for changelog files, but could the rule be changed so it delete the file only if its extension is something different from
js
? Thank you.