Node-sass: --config flag on CLI for config file

Created on 10 Oct 2017  Â·  7Comments  Â·  Source: sass/node-sass

Searched issues for a similar feature request but couldn't find anything, apologies if this is a dupe.

I'd like to have a --config argument for the node-sass CLI that allows a JSON configuration file to be passed in.

Specifically, it would allow me to consolidate a bunch of the arguments I pass into the CLI right now into a single configuration file that can be shared across my projects.

Example (config.json)

{
  "importer": "../path/to/shared/importer",
  "output": "./dist",
  "sourceMap": true,
}

Example (usage): node-sass --config ../path/to/config.json

Happy to make the contribution if this is something that might be desirable.

Feature - Request Module - CLI

Most helpful comment

Looks like a perfect candidate for the initial implementation of #1156

All 7 comments

@xzyfer, what do you think?

Looks like a perfect candidate for the initial implementation of #1156

I would prefer to have a node-sass.json file too. This would avoid the need to reconfigure the IDE for every developer again and again.

That'd be very helpful (and a clean portable solution to the mess that some files of mine have become).

Could you provide and example of the mess?

On 11 Mar. 2018 4:09 am, "Patrick Welker" notifications@github.com wrote:

That'd be very helpful (and a clean portable solution to the mess that
some files of mine have become).

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/sass/node-sass/issues/2113#issuecomment-372045582,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAjZWKVUtwPR5MRb4gZXBvOqSKgHRafnks5tdAjPgaJpZM4PzJqN
.

@xzyfer I referred to my package.json file which I use as a task runner since I canceled my Gulp and Grunt _subscription_. It can easily become a bit crowded in there. I see now that it sounded like I might have pages of pages of custom sass configurations. I always appreciate it when one can specify config files instead of having to add them to the package.json.

Is that a thing, already?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexandrubau picture alexandrubau  Â·  3Comments

NathanKleekamp picture NathanKleekamp  Â·  4Comments

cjo2118 picture cjo2118  Â·  3Comments

bgolubovic picture bgolubovic  Â·  3Comments

liuyuqiang picture liuyuqiang  Â·  3Comments