-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Separate middleware from node-sass #185
Comments
Most people who use sass use it for web app purposes right? What advantage does separating it out into a separate module provide? I don't think the middleware is much code to begin with... |
Taking a quick look at https://npmjs.org/browse/depended/node-sass it seems like a mix of web and CLI tools. I'm guessing a few of them are using their own middleware anyway though. |
I suspect the majority of people use node-sass via grunt-sass and are completely unaware of it. It's an interesting idea, not sure how we would manage the transition though, it would likely break lots off apps pulling it out? |
Yeah, I would say just leave it in there. I know that our production app assumes the middleware is present in node-sass so it doesn't make sense to remove middleware.js (which is only 200 lines of code) if it causes pain & agony for the numerous projects that are using the middleware. If you want to improve on the middleware, you are more than welcome to create a new connect-sass-middleware that has more features than this one. |
@andrew it would require a version bump for sure |
@andrew do you want to create a |
@nschonni yeah that's a good plan, I'll get that started at the weekend. |
👍 I've tagged it as a 0.9.0 milestone |
Started work on that here: https://github.com/andrew/node-sass-middleware |
The middleware has been published to npm now: https://www.npmjs.org/package/node-sass-middleware |
An idea I thought may be worth riffing on is one of moving the connect middleware component from node-sass out into it's own module (eg. connect-node-sass).
The idea of including node-sass into an app that may not actually do HTTP or need per request compilation makes the bundled middleware seem unnecessary.
The text was updated successfully, but these errors were encountered: