Exporting the depcheck ‘special’ property so it can be used in the op…#9
Exporting the depcheck ‘special’ property so it can be used in the op…#9edj-boston wants to merge 3 commits intodepcheck:masterfrom
Conversation
goloroden
left a comment
There was a problem hiding this comment.
Thank you so much for sending a PR! It looks great, there are only a few really minor issues that I would like to ask you to address (see comments).
Apart from that, if you want to, would you mind adding yourself as a contributor to the package.json file? Once these things are done, I am happily going to merge this 😊
README.md
Outdated
|
|
||
| ```javascript | ||
| gulp.task('depcheck', depcheck({ | ||
| specials : [ |
There was a problem hiding this comment.
Can you please change this to indentation with two spaces instead of four?
| const depcheck = require('gulp-depcheck'); | ||
| const myCustomDepcheck = require('depcheck'); | ||
|
|
||
| gulp.task('depcheck', depcheck({ |
There was a problem hiding this comment.
Can you please change this to indentation with two spaces instead of four?
README.md
Outdated
| Note that if you use a custom version of depcheck you must pass any special parsers explicitly. | ||
|
|
||
| ```javascript | ||
| const depcheck = require('gulp-depcheck'); |
There was a problem hiding this comment.
Can you please remove the second const, indent the line with six spaces, and add a comma to the end of the first line?
lib/gulpDepcheck.js
Outdated
| 'use strict'; | ||
|
|
||
| const _ = require('lodash'), | ||
| dc = require('depcheck'), |
There was a problem hiding this comment.
Can you please rename dc to depcheck, and also change the subsequent ones?
There was a problem hiding this comment.
There will be a variable naming conflict between the global depcheck and the const depcheck within the gulpDepcheck scope. Do you have a different preferred name, or another workaround?
There was a problem hiding this comment.
Ah, okay, I see… hmmm. What do you think about this one:
- The global one is
depcheck, as it represents the module. - The local one could be called
depcheckInstance, as this now is the specific one you are going to deal with.
What do you think?
26fe07e to
0d2dfd6
Compare
I added a
specialproperty to the gulp plugin that is a duplicate of the depcheck dependency inside the plugin itself. It allows you to bring in special parsers and pass them as options, like so:Notes:
1.) If someone passes their own version of depcheck as an option, it will not be used by the special property. But they can pass their own specials in like so:
2.) I could not get your code to build on my machine:
But it did lint at least.