-
Notifications
You must be signed in to change notification settings - Fork 9
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
Clean code, recursive directory copying and path normalization #5
base: master
Are you sure you want to change the base?
Conversation
Fixes zont#4 by mentioning the quote requirement in the readme
index.js
Outdated
chokidar.watch(sourceGlobs, { | ||
ignoreInitial: true | ||
}) | ||
.on('ready', () => sourceGlobs.forEach(s => console.log('[WATCHING]'.cyan, s))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why color changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added some color diversity to the log messages to allow for easier reading. COPY
is still yellow, I changed WATCHING
to cyan, DELETE
to red and added CLEAN
in magenta.
I chose these colors (almost) randomly, if you want them changed just say the word.
Too many fixes.
|
Whoops I completely forgot about the linter. ESLint wants me to declare these variables before they are used. Fair game, it would be really stupid to bury globals like this. ESLint also wants me to define functions before they are used, again this makes a lot of sense. To solve this I can declare the globals on top, after that the functions that use them and lastly the actual code. Good? Wrong: ESLint wants me to declare these globals using |
|
||
const findTarget = from => { | ||
/* FUNCTIONS */ | ||
function findTarget(from) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why arrow functions converted to ES5 functions?
Still 2 lint errors |
Please fix 2 lint errors |
As I said earlier:
There are 3 solutions:
I think relaxing the lint settings would be our best option, since splitting the 'acting' code hurts readability a lot. |
Any update on this? |
I found this module to be broken after 2 years without updates, so I cleaned it up a bit and fixed some path normalization.
Main changes are:
Also fixes #4 by mentioning the quote requirement in the readme.