From 2aebcad479044cb4e778484a8218ceecc541dc6c Mon Sep 17 00:00:00 2001 From: GHKEN Date: Wed, 26 Apr 2023 23:41:30 +0900 Subject: [PATCH 1/3] support both directory style in tailwind recipe --- recipes/tailwind/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes/tailwind/index.ts b/recipes/tailwind/index.ts index 3f6b1a713c..4cafa9cea7 100644 --- a/recipes/tailwind/index.ts +++ b/recipes/tailwind/index.ts @@ -39,7 +39,10 @@ export default RecipeBuilder() explanation: `Imports the stylesheet we just added into your app`, singleFileSearch: paths.app(), transform(program) { - const stylesImport = j.importDeclaration([], j.literal("app/core/styles/index.css")) + const stylesImport = j.importDeclaration( + [], + j.literal(`${paths.appSrcDirectory()}/core/styles/index.css`), + ) return addImport(program, stylesImport) }, }) From 905c21bde9c16e70667fc1ca239fb0f57f9b2da7 Mon Sep 17 00:00:00 2001 From: GHKEN Date: Wed, 26 Apr 2023 23:56:53 +0900 Subject: [PATCH 2/3] add changeset --- .changeset/yellow-numbers-serve.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/yellow-numbers-serve.md diff --git a/.changeset/yellow-numbers-serve.md b/.changeset/yellow-numbers-serve.md new file mode 100644 index 0000000000..39dc4f9162 --- /dev/null +++ b/.changeset/yellow-numbers-serve.md @@ -0,0 +1,5 @@ +--- +"@blitzjs/recipe-tailwind": minor +--- + +support both directory style in tailwind recipe From 959b4fe2b46dedef55caf2030453e17095b1b42e Mon Sep 17 00:00:00 2001 From: Siddharth Suresh Date: Mon, 1 May 2023 23:12:23 +0530 Subject: [PATCH 3/3] fix path for tailwind styles --- recipes/tailwind/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/tailwind/index.ts b/recipes/tailwind/index.ts index 4cafa9cea7..ef0e751d4d 100644 --- a/recipes/tailwind/index.ts +++ b/recipes/tailwind/index.ts @@ -29,7 +29,7 @@ export default RecipeBuilder() stepId: "addStyles", stepName: "Stylesheet", explanation: `Adds a root CSS stylesheet where Tailwind is imported and where you can add global styles`, - targetDirectory: "./app/core", + targetDirectory: `./${paths.appSrcDirectory()}/core`, templatePath: join(__dirname, "templates", "styles"), templateValues: {}, })