-
Notifications
You must be signed in to change notification settings - Fork 1.3k
add --require cli option #1617
base: master
Are you sure you want to change the base?
add --require cli option #1617
Conversation
bin/node-sass
Outdated
@@ -309,15 +316,15 @@ function run(options, emitter) { | |||
emitter.emit('error', 'The --source-map option must be either a boolean or directory when compiling a directory'); | |||
} | |||
|
|||
if (options.importer) { | |||
if (options.importer && typeof options.importer === 'string') { |
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 am not completely sure about this check. I had first used util.isString()
, but that is deprecated. I also did not want to add additional dependencies like lodash.isstring
.
I'd rather that node-sass have a public api that could allow projects like eyeglass to automatically load themselves if they conform to that api. Tho, I guess that's basically the feature that eyeglass gives to node-sass so ¯_(ツ)_/¯ |
IMHO
This is a problem with the eyeglass documentation. It focuses heavily on assets, integrations, and custom function but lacks a good getting started guide. This was something I'd previously hoped to resolve but my plate is very full.
I'm not sure these concerns overlap. It's not clear to me what to expect from an
I don't believe this belong in node-sass.
I know there is at least sassport. I'm also aware of a handful of projects that integrate node-sass.
This is what I would have expected.
I'm not sure what this would look like. We do lack something equivalent to Sass's We have previously discussed some kind of |
Thanks for the quick and extensive feedback! After thinking about this again, I now believe that the focus is actually not that much on eyeglass, but on package managing: It feels as eyeglass could be to node-sass what npm is to node. In that regard it is also different from sassport.
I thought about this and it seemed like a good idea at first, but then I realised it would be like re-implementing grunt. I really have no intention of turning node-sass into a fully featured build tool. I guess the problem is really that node-sass has no build-in support for package managing. Eyeglass solves that problem, but it does not work with standard node-sass cli. I am not sure what to make of this yet. I will try to look into the autoloading idea mentioned by chriseppstein. |
Just a quick idea to hear what you think of this: What if the option was not called |
This reverts commit 6656938.
I tried this one now. |
Conflicts: lib/index.js
I did not get any feedback for two month now. Is there anything I can do to get this merged? |
Sorry for keeping you waiting @xi I remember I was also very confused trying to start with eyeglass. Can you give me short a short example how things get easier? Maybe we could add it the docs. |
Running |
I am not sure why appveyor fails. Looks unrelated to me. |
Change C-API to pass compiler to custom functions
It is still quite confusing how to use eyeglass, and I guess part of the problem is that it is not supported by the node-sass cli.
You might argue that this does not belong here. I had first tried to create an eyeglass cli that would mirror node-sass. But that would be a lot of code duplication. The best argument against including this would be if there were other libraries like eyeglass. Obviously we can not add options for all of them. But as far as I know, there is only this one.