Skip to content

Commit

Permalink
using test env instead of dev
Browse files Browse the repository at this point in the history
  • Loading branch information
aversini committed Mar 6, 2024
1 parent 59d640b commit 0e540fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/ui-plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0 --fix --color",
"test:coverage": "echo \"WARNING: no test specified\" && exit 0",
"test:watch": "vitest",
"test": "vitest run"
"test": "cross-env-shell NODE_ENV=test vitest run"
},
"dependencies": {
"@tailwindcss/typography": "0.5.10",
Expand Down
5 changes: 2 additions & 3 deletions packages/ui-plugins/src/plugins/tailwindPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ type TailwindConfig = {
content: string[];
} & OptionalConfig;

export const isProd = process.env.NODE_ENV === "production";
export const isDev = !isProd;
export const isTest = process.env.NODE_ENV === "test";

const packagesList = ["ui-system", "ui-components"];
const distLocation = isDev ? "src" : "dist";
const distLocation = isTest ? "src" : "dist";

export const tailwindContentPath = packagesList.map((pkg) =>
`${__dirname}/**/*.{js,ts,jsx,tsx}`.replace(
Expand Down

0 comments on commit 0e540fb

Please sign in to comment.