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
Move syntax check functionality to an external lib file #154
Conversation
@@ -93,7 +50,10 @@ module.exports = function (grunt) { | |||
} | |||
|
|||
if (options.check) { | |||
checkFiles(this.filesSrc, options, cb); | |||
require("./lib/check") |
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.
single-quotes
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.
Yes, thanks!
|
I added a commit to address your comments so please take a look and let me know if there's something else to fix. If it's okay just ping me to squash before merging. |
checkFiles(this.filesSrc, options, cb); | ||
options.numCPUs = numCPUs; | ||
|
||
require('./lib/check')(this.filesSrc, options, cb); |
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.
require it at the top of the file.
var check = require('./lib/check');
By the way, (asking in general) why an |
@radkodinev That's what they use here. I personally use package.json. But doesn't really matter either way. git stores the contributors and contributions. |
@sindresorhus |
Thanks :) |
Cheers 🍼 |
Move syntax check functionality (the recently merged #147) to an external (
lib/check.js
) file in order to improve maintainability of the plugin and reduce clutter in the main task file.I have some questions:
path
,chalk
, etc. to theinit
function to avoid duplicaterequire
s in thelib/check.js
file.