# HG changeset patch # User Lucas Thompson # Date 1480601149 0 # Node ID e58fb181a11de9d3431ceec00ca296c4b40a7a64 # Parent 47ea1f5af71f1f9e9890b5956ae5668ca9166460 Import waves-ui with TypeScript (ambient module, no typings for now) over angular-cli global scripts. Include there instead a TypeScript file, for creating a webpack scripts bundle of external modules (unused currently, but can provide a way for importing npm modules to a worker). diff -r 47ea1f5af71f -r e58fb181a11d angular-cli.json --- a/angular-cli.json Thu Dec 01 10:35:46 2016 +0000 +++ b/angular-cli.json Thu Dec 01 14:05:49 2016 +0000 @@ -21,7 +21,7 @@ "styles.css" ], "scripts": [ - "../node_modules/waves-ui/waves-ui.min.js" + "externals.ts" ], "environments": { "source": "environments/environment.ts", diff -r 47ea1f5af71f -r e58fb181a11d src/app/waveform/waveform.component.ts --- a/src/app/waveform/waveform.component.ts Thu Dec 01 10:35:46 2016 +0000 +++ b/src/app/waveform/waveform.component.ts Thu Dec 01 14:05:49 2016 +0000 @@ -2,8 +2,8 @@ Component, OnInit, ViewChild, ElementRef, Input, AfterViewInit, NgZone } from '@angular/core'; import {AudioPlayerService} from "../services/audio-player.service"; +import wavesUI from 'waves-ui'; -declare let wavesUI: any; // TODO non-global app scope import type Timeline = any; // TODO what type actually is it.. start a .d.ts for waves-ui? @Component({ diff -r 47ea1f5af71f -r e58fb181a11d src/app/waveform/waves-ui.d.ts --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/app/waveform/waves-ui.d.ts Thu Dec 01 14:05:49 2016 +0000 @@ -0,0 +1,4 @@ +/** + * Created by lucas on 01/12/2016. + */ +declare module 'waves-ui';