Skip to content

Commit

Permalink
Merge pull request #7 from tremorlabs/feat/add-refine
Browse files Browse the repository at this point in the history
feat: add refine
  • Loading branch information
mitrotasios authored Jul 8, 2023
2 parents 6836583 + c99cbb3 commit ef10209
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ async function main() {
choices: [
{ title: "Next", value: "next" },
{ title: "Vite", value: "vite" },
{ title: "Refine", value: "refine" },
{ title: "Redwood", value: "redwood" },
{ title: "Create React App", value: "cra" },
{ title: "Other", value: "other" },
Expand Down
6 changes: 6 additions & 0 deletions src/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ export const CONTENT_CRA = `[
"../node_modules/@tremor/**/*.{js,ts,jsx,tsx}",
]`;

export const CONTENT_REFINE = `[
"./index.html",
"./src/**/*.{js,ts,jsx,tsx}",
"./node_modules/@tremor/**/*.{js,ts,jsx,tsx}",
]`;

export const SAFELIST = `[
{
pattern:
Expand Down
9 changes: 8 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
export type Framework = "next" | "vite" | "redwood" | "cra" | "other";
export type Framework =
| "next"
| "vite"
| "refine"
| "redwood"
| "cra"
| "other";

export type FrameworkConfigType =
| "NEXT_APP_DIR"
| "NEXT_SRC_DIR"
| "NEXT_PAGES_DIR"
| "VITE"
| "REFINE"
| "REDWOOD"
| "CRA";
4 changes: 4 additions & 0 deletions src/utils/get-framework-config-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ export function getFrameworkConfigType(
return "CRA";
}

if (framework === "refine") {
return "CRA";
}

if (framework === "other") {
return "CRA";
}
Expand Down
2 changes: 2 additions & 0 deletions src/utils/get-tailwind-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
CONTENT_NEXT_PAGES_DIR,
CONTENT_NEXT_SRC_DIR,
CONTENT_REDWOOD,
CONTENT_REFINE,
CONTENT_VITE,
SAFELIST,
THEME,
Expand All @@ -15,6 +16,7 @@ const tailwindContentConfigs: { [key in FrameworkConfigType]: string } = {
NEXT_SRC_DIR: CONTENT_NEXT_SRC_DIR,
NEXT_PAGES_DIR: CONTENT_NEXT_PAGES_DIR,
VITE: CONTENT_VITE,
REFINE: CONTENT_REFINE,
REDWOOD: CONTENT_REDWOOD,
CRA: CONTENT_CRA,
};
Expand Down

0 comments on commit ef10209

Please sign in to comment.