mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-19 03:49:34 +00:00
build: convert scripts from CJS to ESM
This commit is contained in:
parent
5433923733
commit
3dc6b6bb12
2 changed files with 34 additions and 33 deletions
|
@ -1,10 +1,9 @@
|
|||
const fs = require("fs");
|
||||
const sass = require("sass");
|
||||
const autoprefixer = require("autoprefixer");
|
||||
const postcss = require("postcss");
|
||||
const path = require("path");
|
||||
import fs from "fs";
|
||||
import sass from "sass";
|
||||
import autoprefixer from "autoprefixer";
|
||||
import postcss from "postcss";
|
||||
import path from "path";
|
||||
|
||||
(async () => {
|
||||
const scss = fs
|
||||
.readdirSync("css")
|
||||
.filter((file) => file.endsWith(".scss") && !/^\_popover/.test(file))
|
||||
|
@ -32,4 +31,3 @@ const path = require("path");
|
|||
|
||||
fs.writeFileSync(outFile, prefixed.css);
|
||||
}
|
||||
})();
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
const fs = require("fs");
|
||||
const glob = require("glob");
|
||||
const { sveld } = require("sveld");
|
||||
const pkg = require("../package.json");
|
||||
import fs from "fs";
|
||||
import glob from "glob";
|
||||
import { sveld } from "sveld";
|
||||
|
||||
const pkg = JSON.parse(
|
||||
fs.readFileSync(new URL("../package.json", import.meta.url), "utf8")
|
||||
);
|
||||
|
||||
sveld({
|
||||
glob: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue