Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Separate middleware from node-sass #185

Closed
joshgillies opened this issue Nov 27, 2013 · 10 comments
Closed

Separate middleware from node-sass #185

joshgillies opened this issue Nov 27, 2013 · 10 comments

Comments

@joshgillies
Copy link

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.

@deanmao
Copy link
Contributor

deanmao commented Nov 27, 2013

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...

@nschonni
Copy link
Contributor

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.

@andrew
Copy link
Contributor

andrew commented Nov 27, 2013

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?

@deanmao
Copy link
Contributor

deanmao commented Nov 27, 2013

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.

@nschonni
Copy link
Contributor

@andrew it would require a version bump for sure

@nschonni
Copy link
Contributor

@andrew do you want to create a node-sass-middleware (or connect-node-sass) repo and then require as a dependency in this repo? That would give us a path to dropping it during a future major release.

@nschonni nschonni modified the milestone: v0.9.0 Mar 27, 2014
@andrew
Copy link
Contributor

andrew commented Mar 28, 2014

@nschonni yeah that's a good plan, I'll get that started at the weekend.

@nschonni nschonni added this to the v0.9.0 milestone Mar 28, 2014
@nschonni
Copy link
Contributor

👍 I've tagged it as a 0.9.0 milestone

@andrew
Copy link
Contributor

andrew commented Mar 31, 2014

Started work on that here: https://github.com/andrew/node-sass-middleware

@nschonni nschonni changed the title Seporate middleware from node-sass Separate middleware from node-sass May 13, 2014
@andrew
Copy link
Contributor

andrew commented Jun 5, 2014

The middleware has been published to npm now: https://www.npmjs.org/package/node-sass-middleware

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants