-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Importer arguments #917
Comments
In |
That's... exactly what I suggested as the 2nd option. Please read on. ;) |
Yup, exactly what you stated and then this question confused me:
when we already have access to (global) |
Right, sure! To clarify, I was wondering whether that might be a bad idea, because for example plans on disallowing unknown CLI args (which many apps do, they'll just print the usage info). Or better yet, if someone has an even better idea for how to pass args to an importer that just hasn't occurred to me! :) |
This is something we're going to need to standardise as plugin, functions The first thing that cones to mind is adding node sass config into the
|
Actually I think that might be the best option for me as well, for a variety of reasons. Thanks for the input! Feel free to close this issue, unless you want to keep it as a reminder to standardize this later on. |
"nodeSassConfig": {
"importerCliParams": { }
} (the ultimate way would be to propose JSON schema: https://github.com/json-schema/json-schema) @jareware, feel free to send the PR with a test case and README update. It is a good starting point and these things keep improving over time. |
Well I'll first try to build it and see if it's actually convenient as well, but I'll report back. :) |
I'm working on a reusable (between projects) importer module for
node-sass
and I'd need to pass in arguments. With the node API this is of course simple, but for the CLI API I see 2 options:node-sass --importer=my-importer.js --myopt-foo=bar
, and reading them back in throughprocess.argv
inmy-importer.js
The latter would be nicer IMO (no need for extraneous files), and the CLI doesn't seem to mind options it doesn't recognize, but would there be a cleaner way that I'm just not thinking of here? Or is there a reason why the latter option just isn't an option?
The text was updated successfully, but these errors were encountered: