Mparaiso / Pimple.js

Pimple is a Dependency Injection Container for javascript , compatible with all javascript enabled browsers.
26 stars 4 forks source link

V2 Pimple API #2

Open evillemez opened 10 years ago

evillemez commented 10 years ago

Would you be open to changing the API to match v2 of Pimple?

For example, in v2, services are shared by default, so there's no need to call "share". Factory services can be registered via container.factory('name', function(){});. I think there's a few other changes, but not huge ones from what I remember.

Mparaiso commented 10 years ago

I'll look into that.

Mparaiso commented 10 years ago

Working on branch 2.X

evillemez commented 10 years ago

Cool, let me know if you want some help on anything.

I actually came up with my own version because we needed something really fast for a project, but I didn't bother publishing it: https://github.com/AmericanCouncils/container.js I didn't make a PR on your project because it was so much of a change that it was basically a rewrite.

It's not a direct port of the v2 api, mind you, I was just trying to simplify the api as much as possible. Anyhow, let me know - would rather contribute to one thing.