build: execute pub get and dart analyzer

When chaining a `pubspec.yaml` we automatically run `pub get`.

In `gulp build` we also run `dartanalyzer` for all files
that have the pattern:

`<module>/lib/<module>.dart`

Closes #13
Closes #5
Closes #2
This commit is contained in:
Tobias Bosch
2014-09-25 17:55:46 -07:00
parent b42111a608
commit 100d66222c
6 changed files with 138 additions and 50 deletions

View File

@ -2,5 +2,7 @@ name: di
environment:
sdk: '>=1.4.0'
dependencies:
facade:
path: ../facade
dev_dependencies:
unittest: '>=0.10.1 <0.12.0'

View File

@ -1,9 +1,9 @@
import {Type} from 'facade/lang';
import {Map, MapWrapper wraps Map} from 'facade/collection';
/// becouse we need to know when toValue was not set.
/// (it could be that toValue is set to null or undefined in js)
var _UNDEFINED = {}
/// becouse we need to know when toValue was not set.
/// (it could be that toValue is set to null or undefined in js)
var _UNDEFINED = {}
export class Module {
@ -12,12 +12,12 @@ export class Module {
this.bindings = new MapWrapper();
}
bind(type:Type,
{toValue=_UNDEFINED, toFactory, toImplementation, inject, toInstanceOf, withAnnotation}/*:
bind(type:Type,
{toValue/*=_UNDEFINED*/, toFactory, toImplementation, inject, toInstanceOf, withAnnotation}/*:
{toFactory:Function, toImplementation: Type, inject: Array, toInstanceOf:Type}*/) {}
bindByKey(key:Key,
{toValue=_UNDEFINED, toFactory, toImplementation, inject, toInstanceOf}/*:
bindByKey(key:Key,
{toValue/*=_UNDEFINED*/, toFactory, toImplementation, inject, toInstanceOf}/*:
{toFactory:Function, toImplementation: Type, inject: Array, toInstanceOf:Type}*/) {}
install(module:Module) {}

View File

@ -1,13 +0,0 @@
import 'dart:core' as core;
import 'dart:collection';
class Map {
new() => null;
ping() => core.print('map');
}
main() {
new Map().ping();
}