Showing
13 changed files
with
27 additions
and
27 deletions
| ... | @@ -2,11 +2,13 @@ | ... | @@ -2,11 +2,13 @@ |
| 2 | "name": "digsig-player-service", | 2 | "name": "digsig-player-service", |
| 3 | "version": "1.0.0", | 3 | "version": "1.0.0", |
| 4 | "description": "", | 4 | "description": "", |
| 5 | - "main": "src/main.ts", | 5 | + "main": "target/index.js", |
| 6 | + "types": "types/index.d.ts", | ||
| 6 | "scripts": { | 7 | "scripts": { |
| 7 | "pretest": "tsc --target es5 --outDir .tmp spec/index.ts", | 8 | "pretest": "tsc --target es5 --outDir .tmp spec/index.ts", |
| 8 | "test": "jasmine .tmp/spec/index.js", | 9 | "test": "jasmine .tmp/spec/index.js", |
| 9 | - "posttest": "rm -R .tmp" | 10 | + "posttest": "rm -R .tmp", |
| 11 | + "build:tsc": "tsc" | ||
| 10 | }, | 12 | }, |
| 11 | "author": "Stefan Huber <stefan.huber@beyondit.at>", | 13 | "author": "Stefan Huber <stefan.huber@beyondit.at>", |
| 12 | "license": "ISC", | 14 | "license": "ISC", | ... | ... |
| 1 | import {ProgramRepository} from '../src/program-repository'; | 1 | import {ProgramRepository} from '../src/program-repository'; |
| 2 | -import Util from '../src/util'; | 2 | +import {Util} from '../src/util'; |
| 3 | 3 | ||
| 4 | -export default class DummyProgramRepository implements ProgramRepository { | 4 | +export class DummyProgramRepository implements ProgramRepository { |
| 5 | 5 | ||
| 6 | findById(id:string) : Promise<any> { | 6 | findById(id:string) : Promise<any> { |
| 7 | return null; | 7 | return null; | ... | ... |
| 1 | -import Player from '../src/player'; | 1 | +import {Player} from '../src/player'; |
| 2 | -import Util from '../src/util'; | 2 | +import {Util} from '../src/util'; |
| 3 | -import DummyProgramRepository from './dummy-program-repository'; | 3 | +import {DummyProgramRepository} from './dummy-program-repository'; |
| 4 | 4 | ||
| 5 | describe('Player', () => { | 5 | describe('Player', () => { |
| 6 | 6 | ... | ... |
| 1 | -import ProgramItemFactory from '../src/program-item/program-item-factory'; | 1 | +import {ProgramItemFactory} from '../src/program-item/program-item-factory'; |
| 2 | -import DummyProgramRepository from './dummy-program-repository'; | 2 | +import {DummyProgramRepository} from './dummy-program-repository'; |
| 3 | import { PROGRAM_ITEM_TYPE_VIDEO, PROGRAM_ITEM_TYPE_SLIDESHOW } from '../src/program-item/program-item'; | 3 | import { PROGRAM_ITEM_TYPE_VIDEO, PROGRAM_ITEM_TYPE_SLIDESHOW } from '../src/program-item/program-item'; |
| 4 | 4 | ||
| 5 | describe('Program Item Factory', () => { | 5 | describe('Program Item Factory', () => { | ... | ... |
| 1 | -import DummyProgramRepository from './dummy-program-repository'; | 1 | +import {DummyProgramRepository} from './dummy-program-repository'; |
| 2 | -import ProgramManager from '../src/program-manager'; | 2 | +import {ProgramManager} from '../src/program-manager'; |
| 3 | -import Util from '../src/util'; | 3 | +import {Util} from '../src/util'; |
| 4 | 4 | ||
| 5 | describe('Program Manager', () => { | 5 | describe('Program Manager', () => { |
| 6 | 6 | ... | ... |
| 1 | import { EventEmitter } from 'events'; | 1 | import { EventEmitter } from 'events'; |
| 2 | import {ProgramRepository} from './program-repository'; | 2 | import {ProgramRepository} from './program-repository'; |
| 3 | -import ProgramManager from './program-manager'; | 3 | +import {ProgramManager} from './program-manager'; |
| 4 | -import Util from './util'; | 4 | +import {Util} from './util'; |
| 5 | 5 | ||
| 6 | const STATE_START = "start"; | 6 | const STATE_START = "start"; |
| 7 | const STATE_STOP = "stop"; | 7 | const STATE_STOP = "stop"; |
| 8 | 8 | ||
| 9 | -export default class Player extends EventEmitter { | 9 | +export class Player extends EventEmitter { |
| 10 | 10 | ||
| 11 | protected _programRepository:ProgramRepository; | 11 | protected _programRepository:ProgramRepository; |
| 12 | protected _programManager:ProgramManager; | 12 | protected _programManager:ProgramManager; | ... | ... |
| 1 | -import ProgramItem, { PROGRAM_ITEM_TYPE_SLIDESHOW, PROGRAM_ITEM_TYPE_VIDEO } from './program-item'; | 1 | +import {ProgramItem, PROGRAM_ITEM_TYPE_SLIDESHOW, PROGRAM_ITEM_TYPE_VIDEO } from './program-item'; |
| 2 | -import { ProgramRepository } from '../program-repository'; | 2 | +import { ProgramRepository } from './../program-repository'; |
| 3 | 3 | ||
| 4 | -export default class ProgramItemFactory { | 4 | +export class ProgramItemFactory { |
| 5 | 5 | ||
| 6 | protected _programRepository:ProgramRepository; | 6 | protected _programRepository:ProgramRepository; |
| 7 | protected _basePath:string; | 7 | protected _basePath:string; | ... | ... |
| 1 | export const PROGRAM_ITEM_TYPE_SLIDESHOW = "slideshow"; | 1 | export const PROGRAM_ITEM_TYPE_SLIDESHOW = "slideshow"; |
| 2 | export const PROGRAM_ITEM_TYPE_VIDEO = "video"; | 2 | export const PROGRAM_ITEM_TYPE_VIDEO = "video"; |
| 3 | 3 | ||
| 4 | -export default class ProgramItem { | 4 | +export class ProgramItem { |
| 5 | 5 | ||
| 6 | protected _type:string; | 6 | protected _type:string; |
| 7 | protected _data:any; | 7 | protected _data:any; | ... | ... |
| 1 | import {ProgramRepository} from './program-repository'; | 1 | import {ProgramRepository} from './program-repository'; |
| 2 | -import Util from './util'; | 2 | +import {Util} from './util'; |
| 3 | -import ProgramItem, { PROGRAM_ITEM_TYPE_SLIDESHOW, PROGRAM_ITEM_TYPE_VIDEO } from './program-item/program-item' | 3 | +import {ProgramItem, PROGRAM_ITEM_TYPE_SLIDESHOW, PROGRAM_ITEM_TYPE_VIDEO } from './program-item/program-item' |
| 4 | 4 | ||
| 5 | -export default class ProgramManager { | 5 | +export class ProgramManager { |
| 6 | 6 | ||
| 7 | protected _programRepository:ProgramRepository; | 7 | protected _programRepository:ProgramRepository; |
| 8 | 8 | ... | ... |
| ... | @@ -4,7 +4,7 @@ | ... | @@ -4,7 +4,7 @@ |
| 4 | "module": "commonjs", | 4 | "module": "commonjs", |
| 5 | "target": "es5", | 5 | "target": "es5", |
| 6 | "declaration": true, | 6 | "declaration": true, |
| 7 | - "declarationDir": "declarations" | 7 | + "declarationDir": "types" |
| 8 | }, | 8 | }, |
| 9 | "include": [ | 9 | "include": [ |
| 10 | "./src/index.ts" | 10 | "./src/index.ts" | ... | ... |
-
Please register or login to post a comment