Skip to content
Browse files

added license file and renamed package to coffee-sweetener

  • Loading branch information...
1 parent fd7cf37 commit c859d5a77bbd6fd4d2927fe7afa3dffa482e3bdb @vizio360 committed Apr 9, 2013
Showing with 20 additions and 13 deletions.
  1. +8 −0 LICENSE
  2. +8 −8 README.md
  3. +4 −5 package.json
View
8 LICENSE
@@ -0,0 +1,8 @@
+The MIT License (MIT)
+Copyright (c) 2013 Simone Vicentini (@vizio360)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
16 README.md
@@ -1,7 +1,7 @@
# Dependency Injection in CoffeeScript
**Table of Contents**
- - [coffeeInjector](#coffeeinjector)
+ - [coffee-sweetener](#coffee-sweetener)
- [API](#api)
- [Let's start with an example](#lets-start-with-an-example)
- [Create an Injector](#create-an-injector)
@@ -20,7 +20,7 @@
- [Class Injection Points](#class-injection-points)
- [Instance initialisation](#instance-initialisation)
-# coffeeInjector
+# coffee-sweetener
This is a small utility component that you can use in your applications to ease the management of dependencies between objects.
The idea is simple, you have a factory object (we'll call this the *injector*) where you define some mappings.
@@ -36,8 +36,8 @@ class MyClass
sayYeah: ->
console.log "YEAH!"
# get the Injector
-CoffeeInjector = require "coffeeInjector"
-Injector = new CoffeeInjector()
+CoffeeSweetener = require "coffee-sweetener"
+Injector = new CoffeeSweetener()
# map MyClass in the Injector
Injector.map
@@ -50,14 +50,14 @@ instance.sayYeah() # this print "YEAH!" to the console
## Create an Injector
```coffeescript
-CoffeeInjector = require "coffeeInjector"
-Injector = new CoffeeInjector()
+CoffeeSweetener = require "coffee-sweetener"
+Injector = new CoffeeSweetener()
```
Every Injector will automatically create a mapping to itself as a Singleton called "Injector".
This is useful if you want to get hold of the injector from within a class, by just specifying it in the list of the injection points.
```coffeescript
-CoffeeInjector = require "coffeeInjector"
-Injector = new CoffeeInjector()
+CoffeeSweetener = require "coffee-sweetener"
+Injector = new CoffeeSweetener()
class MyClass
inject:
View
9 package.json
@@ -1,7 +1,7 @@
{
- "name": "coffee-injector",
+ "name": "coffee-sweetener",
"version": "0.0.1",
- "description": "Small and simple utility component that you can use in your applications to ease the management of dependencies between objects. The idea is simple, you have a factory object (we'll call this the *injector*) where you define some mappings. Each mapping has a unique id that you define. From different modules you can query the *injector* to give you a new instance of a specific mapping. Within classes you can define depenecies which will be satisfied on creation of a new instance of that class.",
+ "description": "Small utility component that you can use in your applications to ease the management of dependencies between objects. The idea is simple, you have a factory object (we'll call this the *injector*) where you define some mappings. Each mapping has a unique id that you define. From different modules you can query the *injector* to give you a new instance of a specific mapping. Within classes you can define depenecies which will be satisfied on creation of a new instance of that class.",
"main": "index.js",
"directories": {
"lib": "lib",
@@ -17,11 +17,10 @@
},
"repository": {
"type": "git",
- "url": "git://github.com/vizio360/coffeeInjector.git"
+ "url": "https://github.com/vizio360/coffee-sweetener"
},
"author": "Simone Vicentini (@vizio360)",
- "license": "BSD",
- "gitHead": "7950255063a3ddf5360f48e1cd03a612dddecd86",
+ "license": "MIT",
"readmeFilename": "README.md",
"keywords": [
"coffeescript",

0 comments on commit c859d5a

Please sign in to comment.
Something went wrong with that request. Please try again.