Skip to content
This repository was archived by the owner on May 5, 2024. It is now read-only.

Commit 1e3d353

Browse files
committed
🧹 chore: refactor for getConfigExpression -> setDefaultDefaultExport change
1 parent 6ab0434 commit 1e3d353

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

__run.js

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { walk } from "estree-walker";
22
import { AtRule } from "postcss";
3-
import { addImport, findImport, getConfigExpression, setDefault } from "../../ast-tools.js";
3+
import { addImport, findImport, setDefaultDefaultExport, setDefault } from "../../ast-tools.js";
44
import { extension, postcssConfigCjsPath, stylesHint } from "../postcss/stuff.js";
55
import { tailwindConfigCjsPath } from "./stuff.js";
66

@@ -9,8 +9,12 @@ import { tailwindConfigCjsPath } from "./stuff.js";
99
* @returns {import("../../ast-io.js").RecastAST}
1010
*/
1111
const updatePostcssConfig = (postcssConfigAst) => {
12-
const configObject = getConfigExpression({
12+
const configObject = setDefaultDefaultExport({
1313
cjs: true,
14+
defaultValue: {
15+
type: "ObjectExpression",
16+
properties: [],
17+
},
1418
typeScriptEstree: postcssConfigAst,
1519
});
1620

@@ -134,8 +138,12 @@ const updatePostcssConfig = (postcssConfigAst) => {
134138
* @returns {import("../../ast-io.js").RecastAST}
135139
*/
136140
const updateTailwindConfig = (tailwindConfigAst, forms, typography) => {
137-
const configObject = getConfigExpression({
141+
const configObject = setDefaultDefaultExport({
138142
cjs: true,
143+
defaultValue: {
144+
type: "ObjectExpression",
145+
properties: [],
146+
},
139147
typeScriptEstree: tailwindConfigAst,
140148
});
141149

0 commit comments

Comments
 (0)