All files / packages/sds-metadata/scripts bundle.js

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

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 14 15 16 17 18 19 20 21 22 23 24 25 26 27                                                     
/**
 * This file executes functions to generate metadata files and script files required to be part of publish bundle
 */
 
import { dirname, resolve} from 'path';
import { existsSync } from 'fs';
import { fileURLToPath } from 'url';
import {generateMetadata} from './generate-metadata.js';
import {generateExports} from './generate-exports.js';
 
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
 
const SLDS_PLUS_CSS_PATH = resolve(`${__dirname}/../../sds-subsystems/dist/css/slds2.cosmos.css`);
 
if(!existsSync(SLDS_PLUS_CSS_PATH)){
    console.log(`❌ slds2.cosmos.css is missing!`);
    console.log(`Execute build:css command in sds-subsystems package`);
    process.exit(1);
}
 
await generateMetadata();
await generateExports();
 
console.log(`✅ Generated all metadata files.`);