Skip to content

Commit

Permalink
Merge pull request #38 from jeff-phillips-18/dist-js-css-fix
Browse files Browse the repository at this point in the history
fix(css): Export css to the dist/js directory
  • Loading branch information
jeff-phillips-18 authored Apr 17, 2023
2 parents 8e3074a + b6847e7 commit 4fc47f9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/module/scripts/writeClassMaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const { generateClassMaps } = require('./generateClassMaps');
const { ensureDirSync } = require('fs-extra/lib/mkdirs');

const outDir = resolve(__dirname, '../src/css');
const distDir = resolve(__dirname, '../dist/esm/css');
const esmDistDir = resolve(__dirname, '../dist/esm/css');
const jsDistDir = resolve(__dirname, '../dist/js/css');

const writeCJSExport = (file, classMap) =>
outputFileSync(
Expand Down Expand Up @@ -63,8 +64,11 @@ function writeClassMaps(classMaps) {
writeESMExport(outPath, classMap);
copyFileSync(file, join(outDir, outPath));

ensureDirSync(distDir);
copySync(outDir, distDir);
ensureDirSync(esmDistDir);
copySync(outDir, esmDistDir);

ensureDirSync(jsDistDir);
copySync(outDir, jsDistDir);
});

// eslint-disable-next-line no-console
Expand Down

0 comments on commit 4fc47f9

Please sign in to comment.