function generateClosuredComponents() {
    const componentsDir = './src/components';

    // Cleanup
    childProcess.execSync(`rm -rf ${componentsDir}`);

    // Generate
    fs.mkdirSync(componentsDir);
    LIST.forEach(name => {
        const componentSrcPath = `./node_modules/prismjs/components/prism-${name}.js`;
        const componentSrc = fs.readFileSync(componentSrcPath);
        const moduleSrc = moduleExport(prismClosure(componentSrc));
        const outputPath = path.join(componentsDir, `prism-${name}.js`);
        fs.writeFileSync(outputPath, moduleSrc);
    });
}
/*
 * Generate the sources for closured components
 */
Generate the sources for closured components
Generate the sources for closured components
function generateClosuredComponents() {
    const componentsDir = './src/components';
    childProcess.execSync(`rm -rf ${componentsDir}`);
    fs.mkdirSync(componentsDir);
    LIST.forEach(name => {
        const componentSrcPath = `./node_modules/prismjs/components/prism-${name}.js`;
        const componentSrc = fs.readFileSync(componentSrcPath);
        const moduleSrc = moduleExport(prismClosure(componentSrc));
        const outputPath = path.join(componentsDir, `prism-${name}.js`);
        fs.writeFileSync(outputPath, moduleSrc);
    });
}
function generateClosuredComponents ( ) { const componentsDir = './src/components' ; childProcess . execSync ( ` ${ componentsDir } ` ) ; fs . mkdirSync ( componentsDir ) ; LIST . forEach ( name => { const componentSrcPath = ` ${ name } ` ; const componentSrc = fs . readFileSync ( componentSrcPath ) ; const moduleSrc = moduleExport ( prismClosure ( componentSrc ) ) ; const outputPath = path . join ( componentsDir , ` ${ name } ` ) ; fs . writeFileSync ( outputPath , moduleSrc ) ; } ) ; }
Generate the sources for closured components
Generate the sources for closured components
// Cleanup // Generate