revelrylabs / sassy-npm-importer

Import SASS from npm via a customizable prefix.
MIT License
18 stars 2 forks source link

using npm's resolve package to get package information #5

Closed bashaus closed 7 years ago

bashaus commented 7 years ago

Hey there

I've put together this implementation which uses the npm resolve package to retrieve the package. The benefit of this is that it allows you to use the main property of the package.json file.

jwietelmann commented 7 years ago

The feature is a solid idea. I would much prefer you started fresh and did not refactor so much along the way, for a few reasons:

  1. IMO, refactoring should be considered on its own potential merits, in isolation, unless the refactor is specifically needed to achieve the feature. In this case, I don't think it is an intrinsic part of the feature.
  2. Because this feature could be a backward-compatible slam dunk, but you've introduced later-Node-version constructs.
  3. If there is any down-the-road refactor at all, it's because we're going to use all the latest and greatest and run it through Babel before publishing.

tl;dr - I'm interested in the feature. I'm not interested in refactoring this way.