@netlify/framework-info
Version:
Framework detection utility
22 lines (21 loc) • 857 B
TypeScript
import type { Context } from './context.js';
import type { FrameworkName } from './generated/frameworkNames.js';
import type { Framework, FrameworkDefinition } from './types.js';
/**
* Return all the frameworks used by a project.
*/
export declare const listFrameworks: (context: Context) => Promise<Framework[]>;
/**
* Return whether a project uses a specific framework
*/
export declare const hasFramework: (frameworkId: FrameworkName, context: Context) => Promise<boolean>;
/**
* Return some information about a framework used by a project.
*/
export declare const getFramework: (frameworkId: FrameworkName, context: Context) => Promise<Framework>;
/**
* Gets the framework by its id
* @param {string} frameworkId - Id such as `"gatsby"`
* @returns
*/
export declare const getFrameworkById: (frameworkId: FrameworkName) => FrameworkDefinition;