Skip to content

Commit

Permalink
feat(dependencies): Provided external dependencies as imports
Browse files Browse the repository at this point in the history
  • Loading branch information
rubyboy committed Feb 10, 2016
1 parent 98aec70 commit d2ead42
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
10 changes: 4 additions & 6 deletions app/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {Dialogs} from "./components/dialogs";
import {Dropdown} from "./components/dropdown";
import {Collapsible} from "./components/collapsible";
import {Buttons} from "./components/buttons";
import {Component} from "angular2/core"
import {RouteConfig, ROUTER_DIRECTIVES, Location} from "angular2/router"
import "../src/index"
import {Component} from "angular2/core";
import {RouteConfig, ROUTER_DIRECTIVES, Location} from "angular2/router";
import "../src/index";

@Component({
selector: "my-app",
Expand Down Expand Up @@ -50,6 +50,4 @@ import "../src/index"
{path: "/forms", component: Forms, name: "Forms"},
{path: "/tabs", component: Tabs, name: "Tabs"}
])
export class App {

}
export class App { }
9 changes: 6 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import "materialize";
// export {Materialize,MaterializeOptions} from "./materialize"
export {MaterializeDirective} from "./materialize-directive"

declare var Waves:any;
// export {Materialize,MaterializeOptions} from "./materialize";
export {MaterializeDirective} from "./materialize-directive";
export {$,Materialize,Waves} from './materialize-providers';

import {Waves} from './materialize-providers';

Waves.displayEffect();
4 changes: 1 addition & 3 deletions src/materialize-directive.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {Directive, ElementRef, Input, AfterViewInit} from 'angular2/core';
import {$,Materialize} from './materialize-providers';

// This will only be supported in TS 1.8
// export type MaterializeOptions =
Expand All @@ -12,9 +13,6 @@ import {Directive, ElementRef, Input, AfterViewInit} from 'angular2/core';
// "sideNav" |
// "leanModal";

declare var $:any;
declare var Materialize:any;

@Directive({
selector: '[materialize]'
})
Expand Down
5 changes: 5 additions & 0 deletions src/materialize-providers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
declare var $:any;
declare var Materialize:any;
declare var Waves:any;

export {$,Materialize,Waves}

0 comments on commit d2ead42

Please sign in to comment.