smartbrowser/dist/index.d.ts

32 lines
915 B
TypeScript
Raw Normal View History

2016-09-19 18:00:19 +00:00
/// <reference types="browser-sync" />
import * as plugins from './smartbrowser.plugins';
/**
* the options interface of a Smartbrowser instance
*/
export interface ISmartbrowserOptions {
webroot: string;
watchFiles: string[];
}
/**
* Type of status that a bsInstance can have
*/
export declare type bsStatus = 'idle' | 'starting' | 'running';
/**
* class smartbrowser controls a browser-sync instance for you
*/
export declare class Smartbrowser {
bsInstance: plugins.browserSync.BrowserSyncInstance;
bsConfig: plugins.browserSync.Options;
bsStatus: bsStatus;
2017-04-09 10:35:53 +00:00
bsStarted: Promise<void>;
2016-09-19 18:00:19 +00:00
constructor(optionsArg: ISmartbrowserOptions);
/**
* starts the server and returns the browserSync instance in a resolved Promise
*/
2017-04-09 10:35:53 +00:00
start(): Promise<plugins.browserSync.BrowserSyncInstance>;
2016-09-19 18:00:19 +00:00
/**
* stops the smartbrowser instance
*/
2017-04-09 10:35:53 +00:00
stop(): Promise<void>;
2016-09-19 18:00:19 +00:00
}