UNPKG

824 BTypeScriptView Raw
1import { SnowpackConfig, SnowpackSourceFile } from './config';
2/**
3 * An install target represents information about a dependency to install.
4 * The specifier is the key pointing to the dependency, either as a package
5 * name or as an actual file path within node_modules. All other properties
6 * are metadata about what is actually being imported.
7 */
8export declare type InstallTarget = {
9 specifier: string;
10 all: boolean;
11 default: boolean;
12 namespace: boolean;
13 named: string[];
14};
15export declare function scanDepList(depList: string[], cwd: string): InstallTarget[];
16export declare function scanImports(cwd: string, config: SnowpackConfig): Promise<InstallTarget[]>;
17export declare function scanImportsFromFiles(loadedFiles: SnowpackSourceFile[], { scripts }: SnowpackConfig): Promise<InstallTarget[]>;