sw-builder
Version:
The sw-builder package automates the creation of your Application's Service Worker, which pre-caches your build. This leads to a better overall performance and enables users to access your PWA without an Internet connection.
27 lines (26 loc) • 729 B
TypeScript
import { IBaseParsedArgs } from 'argv-utils';
/**
* Module Args
* The args that can bt passed to the sw-builder CLI
*/
interface IModuleArgs extends IBaseParsedArgs {
config?: string;
}
/**
* Template Name
* The list of templates supported by the sw-builder.
*/
type ITemplateName = 'base';
/**
* Base Configuration
* The configuration required to build the 'base' template. This type should be turned into a
* discriminated union once more templates are introduced.
*/
type IBaseConfig = {
outDir: string;
template: ITemplateName;
includeToPrecache: string[];
excludeFilesFromPrecache: string[];
excludeMIMETypesFromCache: string[];
};
export type { IModuleArgs, ITemplateName, IBaseConfig, };