[nodejs] AngularJS inspired dependency injection in Node (feedback?)

2013-04-20 Thread Scott Corgan
Not sure what kind of backlash I'll get for doing things slightly different than the "Node" way, but I wrote what I believe is the easiest and lightest solution I've seen for dependency injection for Node. It's call Injector (https://github.com/scottcor

[nodejs] Re: Dependency injection for Node.js. What do you think?

2013-04-20 Thread Scott Corgan
Easier? https://github.com/scottcorgan/Injector On Friday, July 27, 2012 7:45:48 AM UTC-7, Eldar wrote: > > Do we need this in Node? > > My answer is yes we need some (simple) way to specify the app level > dependencies at runtime. Here is my take on > this

[nodejs] Re: AngularJS inspired dependency injection in Node (feedback?)

2013-04-25 Thread Scott Corgan
ours. Thank you very much for sharing this. > > Am Samstag, 20. April 2013 19:19:27 UTC+2 schrieb Scott Corgan: >> >> Not sure what kind of backlash I'll get for doing things slightly >> different than the "Node" way, but I wrote what I believe is the easiest

[nodejs] Re: AngularJS inspired dependency injection in Node (feedback?)

2013-04-25 Thread Scott Corgan
nts? > > On Saturday, April 20, 2013 1:19:27 PM UTC-4, Scott Corgan wrote: >> >> Not sure what kind of backlash I'll get for doing things slightly >> different than the "Node" way, but I wrote what I believe is the easiest >> and lightest solution I&#x

Re: [nodejs] Re: AngularJS inspired dependency injection in Node (feedback?)

2013-04-25 Thread Scott Corgan
; the names of the parameters and then resolves the dependencies either based > on what you have registered manually or in directories you have registered. > > > > > On Thu, Apr 25, 2013 at 9:10 AM, Scott Corgan > > wrote: > >> Hi Paul, >> >> I&#x

Re: [nodejs] Re: AngularJS inspired dependency injection in Node (feedback?)

2013-04-25 Thread Scott Corgan
/stubbed for testing while easily useable in a modular Node application. On Thursday, April 25, 2013 10:28:15 AM UTC-7, Nuno Job wrote: > > Is this similar to https://github.com/3rd-Eden/canihaz ? > > Nuno > > > On Thu, Apr 25, 2013 at 4:09 PM, Scott Corgan > > wrote: >

Re: [nodejs] Re: AngularJS inspired dependency injection in Node (feedback?)

2013-04-25 Thread Scott Corgan
Great idea! I'll right something up and post link in this thread. > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To pos

Re: [nodejs] Re: AngularJS inspired dependency injection in Node (feedback?)

2013-04-25 Thread Scott Corgan
But together a quick and rough blog post describing the problem I wam solving and the "why" behind Injector: http://sctt.cc/6Mue -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because yo

[nodejs] Re: AngularJS inspired dependency injection in Node (feedback?)

2013-04-25 Thread Scott Corgan
Put together a quick blog post describing the problem I am solving and the "why" behind Injector: http://sctt.cc/6Mue On Saturday, April 20, 2013 10:19:27 AM UTC-7, Scott Corgan wrote: > > Not sure what kind of backlash I'll get for doing things slightly > different th

Re: [nodejs] Re: AngularJS inspired dependency injection in Node (feedback?)

2013-04-25 Thread Scott Corgan
Ahhh. Sorry for the typos. On Thursday, April 25, 2013 10:38:30 AM UTC-7, Nuno Job wrote: > > Interesting. Would be awesome to read on a blog post and compared to just > plain old require. For us non angular guys this is not obvious :) > > Nuno > -- -- Job Board: http://jobs.nodejs.org/ Postin

Re: [nodejs] Re: AngularJS inspired dependency injection in Node (feedback?)

2013-04-25 Thread Scott Corgan
t; instance, how would I inject 'fs' or 'http'? Or perhaps 'request'? > -- > Martin Cooper > On Thu, Apr 25, 2013 at 12:04 PM, Scott Corgan wrote: >> Put together a quick blog post describing the problem I am solving and the >> "why" behind I

Re: [nodejs] Re: AngularJS inspired dependency injection in Node (feedback?)

2013-04-26 Thread Scott Corgan
Very true! There is the argument that that's what the "node_modules" folder is for, and that may be true. But, there's something just beautiful about being able to control the definition or your dependencies when writing testable code! -- -- Job Board: http://jobs.nodejs.org/ Posting guidelin

Re: [nodejs] Re: AngularJS inspired dependency injection in Node (feedback?)

2013-04-26 Thread Scott Corgan
Looks great! - Scott Corgan On Friday, April 26, 2013 at 3:02 PM, Eldar wrote: > You might find easy-app (https://github.com/eldargab/easy-app) also > interesting. > > -- > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyen

[nodejs] Re: AngularJS inspired dependency injection in Node (feedback?)

2013-05-08 Thread Scott Corgan
FYI, 0.4.0 was released a few days ago. Updates include loading NPM and Core modules via injection and support for multiple directions! https://github.com/scottcorgan/injector#changelog -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-Li

Re: [nodejs] AngularJS inspired dependency injection in Node (feedback?)

2013-07-23 Thread Scott Corgan
Architect is what inspired me to make Injector. I loved architect because it removed the pain of knowing how many "../../../" to put when requiring a file. Love it. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines

Re: [nodejs] AngularJS inspired dependency injection in Node (feedback?)

2013-07-31 Thread Scott Corgan
Architect requires defining each module in a config file. In that file, you are required to know the exact location of the module. The goal with Injector is to create a way that I could move modules around as I organize my app, and I wouldn't need to update my references to it anywhere; it happens

[nodejs] Appending one more chunk to the end of a stream.

2013-07-31 Thread Scott Corgan
Been sitting on this one for awhile and can't seem to figure it out or find anyone that has a solution. I just need to append one more chunk to the end of a stream. At first, I thought I was successful using the "through" module, but for some reason, it kept appending the new chunk in the middl

Re: [nodejs] Appending one more chunk to the end of a stream.

2013-07-31 Thread Scott Corgan
That looks like it would work. Tried it, and I'm getting my chunk put into the middle of stream, instead of the end. I'm using the "node-trumpet" module to parse html. I filed an issue for the module, so I'm not sure if it's the module or my code. On Wed, Jul 31, 2013 at 11:07 AM, Michael Ryan w

Re: [nodejs] Re: Appending one more chunk to the end of a stream.

2013-08-01 Thread Scott Corgan
7;); > var chunkStream = new require('stream').PassThrough(); > > var ss = new StreamStream(); > ss.write(mySource); > ss.write(chunkStream); > ss.pipe(myDestination); > chunkStream.end(myChunkIdLikeToAppend); > > On Wednesday, 31 July 2013 19:54:44 UTC+2, Scott Corgan wr