33 lines
973 B
TypeScript
33 lines
973 B
TypeScript
/// <reference types="browser-sync" />
|
|
/// <reference types="q" />
|
|
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;
|
|
bsStarted: plugins.q.Promise<void>;
|
|
constructor(optionsArg: ISmartbrowserOptions);
|
|
/**
|
|
* starts the server and returns the browserSync instance in a resolved Promise
|
|
*/
|
|
start(): plugins.q.Promise<plugins.browserSync.BrowserSyncInstance>;
|
|
/**
|
|
* stops the smartbrowser instance
|
|
*/
|
|
stop(): plugins.q.Promise<void>;
|
|
}
|