All files / packages/sds-metadata/src/generators slds1-deprecated-component-hooks.ts

0% Statements 0/4
0% Branches 0/2
100% Functions 0/0
0% Lines 0/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13                         
import { SLDS1_DEPRECATED_COMPONENT_HOOKS_JSON, SLDS_DEPRECATED_COMPONENT_HOOKS_FILENAME } from "../constants.js";
import { readJSON, writeData } from "../services/file-service.js";
import { SupportedFileFormat } from "../types.js";
 
export async function generateSLDS1DeprecatedComponentHooks(outputDir: string = process.cwd(), format: SupportedFileFormat = 'json') {
    try {
        const deprecatedComponentHooks = await readJSON(SLDS1_DEPRECATED_COMPONENT_HOOKS_JSON);
        writeData(SLDS_DEPRECATED_COMPONENT_HOOKS_FILENAME, deprecatedComponentHooks, outputDir, format);
    } catch (error) {
        console.error('Error generating slds1 deprecated component hooks:', error);
        throw error;
    }
}