All files / packages/sds-metadata/src/generators slds-excluded-vars.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_EXCLUDED_VARS_JSON, SLDS_EXCLUDED_VARS_FILENAME } from "../constants.js";
import { readJSON, writeData } from "../services/file-service.js";
import { SupportedFileFormat } from "../types.js";
 
export async function generateSLDSExcludedVars(outputDir: string = process.cwd(), format: SupportedFileFormat = 'json') {
    try {
        const excludedVars = await readJSON(SLDS1_EXCLUDED_VARS_JSON);
        writeData(SLDS_EXCLUDED_VARS_FILENAME, excludedVars, outputDir, format);
    } catch (error) {
        console.error('Error generating slds excluded vars:', error);
        throw error;
    }
}