Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

history* pattern #3

Closed
ingro opened this issue May 27, 2015 · 5 comments
Closed

history* pattern #3

ingro opened this issue May 27, 2015 · 5 comments
Assignees
Labels

Comments

@ingro
Copy link

ingro commented May 27, 2015

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 running modclean 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.

@KyleRoss
Copy link
Member

Thanks for reporting this, I will change the patterns to fix it.

@KyleRoss KyleRoss self-assigned this May 28, 2015
@KyleRoss KyleRoss added the bug label May 28, 2015
KyleRoss added a commit that referenced this issue May 28, 2015
Release fixes deletion of history.js files as reported in #3
@KyleRoss
Copy link
Member

Fixed and published in version 1.2.2

@ingro
Copy link
Author

ingro commented May 28, 2015

Thank you sir :)

@DanielSundberg
Copy link

Still an issue for me in 1.2.7, see #8

@McPo
Copy link

McPo commented Nov 4, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants