mirror of
https://github.com/hanzoai/account-sdk.git
synced 2026-09-24 16:55:42 +00:00
* feat: fix nodenext module resolution; jest → vitest; remove barrel files * fix * chore: tweaks * fix * lint * fix imports * fix lint --------- Co-authored-by: jxom <[email protected]> Co-authored-by: jxom <[email protected]>
23 lines
691 B
JavaScript
23 lines
691 B
JavaScript
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
// Copyright (c) 2018-2023 Coinbase, Inc. <https://www.coinbase.com/>
|
|
|
|
const fs = require('fs');
|
|
const glob = require('glob');
|
|
const sass = require('sass');
|
|
|
|
async function main() {
|
|
// compile SCSS
|
|
const scssFiles = glob.sync(`${__dirname}/src/**/*.scss`);
|
|
for (const filePath of scssFiles) {
|
|
console.info(`Compiling ${filePath}...`);
|
|
const css = sass.renderSync({ file: filePath, outputStyle: 'compressed' }).css.toString('utf8');
|
|
const ts = `export default (() => \`${css}\`)();`;
|
|
fs.writeFileSync(filePath.replace(/\.scss$/, '-css.ts'), ts, {
|
|
mode: 0o644,
|
|
});
|
|
}
|
|
console.info('DONE!');
|
|
}
|
|
|
|
main();
|