@stylable/core
Version:
CSS for Components
51 lines • 2.79 kB
TypeScript
import { FileProcessor, MinimalFS } from './cached-process-file';
import { Diagnostics } from './diagnostics';
import { processNamespace, StylableMeta } from './stylable-processor';
import { StylableResolver } from './stylable-resolver';
import { StylableResults, StylableTransformer, TransformerOptions, TransformHooks } from './stylable-transformer';
import { TimedCacheOptions } from './timed-cache';
import { IStylableOptimizer, ModuleResolver } from './types';
export interface StylableConfig {
projectRoot: string;
fileSystem: MinimalFS;
requireModule?: (path: string) => any;
delimiter?: string;
onProcess?: (meta: StylableMeta, path: string) => StylableMeta;
diagnostics?: Diagnostics;
hooks?: TransformHooks;
resolveOptions?: {
alias: any;
symlinks: boolean;
[key: string]: any;
};
optimizer?: IStylableOptimizer;
mode?: 'production' | 'development';
resolveNamespace?: typeof processNamespace;
timedCacheOptions?: Omit<TimedCacheOptions, 'createKey'>;
resolveModule?: ModuleResolver;
}
export declare class Stylable {
projectRoot: string;
protected fileSystem: MinimalFS;
protected requireModule: (path: string) => any;
delimiter: string;
protected onProcess?: ((meta: StylableMeta, path: string) => StylableMeta) | undefined;
protected diagnostics: Diagnostics;
protected hooks: TransformHooks;
protected resolveOptions: any;
optimizer?: IStylableOptimizer | undefined;
protected mode: 'production' | 'development';
protected resolveNamespace?: typeof processNamespace | undefined;
protected timedCacheOptions: Omit<TimedCacheOptions, 'createKey'>;
protected resolveModule?: ModuleResolver | undefined;
static create(config: StylableConfig): Stylable;
fileProcessor: FileProcessor<StylableMeta>;
resolver: StylableResolver;
resolvePath: (ctx: string | undefined, path: string) => string;
constructor(projectRoot: string, fileSystem: MinimalFS, requireModule: (path: string) => any, delimiter?: string, onProcess?: ((meta: StylableMeta, path: string) => StylableMeta) | undefined, diagnostics?: Diagnostics, hooks?: TransformHooks, resolveOptions?: any, optimizer?: IStylableOptimizer | undefined, mode?: 'production' | 'development', resolveNamespace?: typeof processNamespace | undefined, timedCacheOptions?: Omit<TimedCacheOptions, 'createKey'>, resolveModule?: ModuleResolver | undefined);
createTransformer(options?: Partial<TransformerOptions>): StylableTransformer;
transform(meta: StylableMeta): StylableResults;
transform(source: string, resourcePath: string): StylableResults;
process(fullpath: string, context?: string, ignoreCache?: boolean): StylableMeta;
}
//# sourceMappingURL=stylable.d.ts.map