Closed justinvdm closed 9 years ago
Hello,
just a heads up, I've started working on this over here: https://github.com/davidlgj/jspot/tree/feature/cli-extractors
It works for me(™), but since it lacks test I didn't want to create a PR :)
ps. thanks for jspot!
@davidlgj thanks! Took a look, and realised that we actually aren't that far away from support this now. I adapted the bit you added, and added some tests. Just figuring out why travis isn't happy and I'll declare this PR ready for review.
Cool!
I guess that the problem travis has is because of the path.resolve()
in the second require. Since the test uses a ./
in its module path the code is dependant on what is the current working directory, maybe travis doesn't cd to the project dir before doing npm test
?
Ready for review.
@davidlgj Ya, the problem was with the one custom extractor fixture. I forgot for a second that require
-ing is relative to the module's dir if a relative path is given.
Looks good from my side :+1: Thanks for writing the tests.
@davidlgj @JSteunou jspot 0.3.6 released with this
Hoho exiting news! I was a bit off the topic (lot of work) but I'll take a look for sure. Great work guys!
From the discussion on #11, the plan is to allow external extractors to be plugged in via the cli. The command might look something like:
We could maybe have each
-e
first look for a bundled extractor (which I'd like to keep to justjs
andhbs
, at least for now), and fall back to trying to require a module name (in the example above,jspot-jst
).