Skip to content

Commit

Permalink
chore: add shared package - tailwind config
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmarqs committed Jan 25, 2025
1 parent 56c7cf1 commit 5768b2a
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 18 deletions.
1 change: 1 addition & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
},
"devDependencies": {
"@tech-companies-portugal/typescript": "*",
"@tech-companies-portugal/tailwind": "*",
"@types/node": "^20",
"@types/react": "19.0.2",
"@types/react-dom": "19.0.2",
Expand Down
17 changes: 3 additions & 14 deletions apps/web/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
import baseConfig from "@tech-companies-portugal/tailwind";
import type { Config } from "tailwindcss";
import { fontFamily } from "tailwindcss/defaultTheme";

const config = {
content: [
"./pages/**/*.{ts,tsx}",
"./components/**/*.{ts,tsx}",
"./app/**/*.{ts,tsx}",
"./src/**/*.{ts,tsx}",
],
theme: {
container: {
center: true,
padding: "2rem",
screens: {
"2xl": "1400px",
},
},
extend: {
fontFamily: {
sans: ["var(--font-geist-sans)", ...fontFamily.sans],
Expand Down Expand Up @@ -64,6 +52,7 @@ const config = {
},
},
plugins: [require("tailwindcss-animate")],
} satisfies Config;
presets: [baseConfig],
} satisfies Pick<Config, "theme" | "plugins" | "presets">;

export default config;
12 changes: 12 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
"name": "tech-companies-portugal",
"private": true,
"author": "Alexandre Marques",
"workspaces": ["apps/*", "tooling/*", "packages/*"],
"workspaces": [
"apps/*",
"tooling/*",
"packages/*"
],
"description": "Monorepo for the Tech Companies in Portugal",
"scripts": {
"build": "turbo build",
Expand All @@ -24,4 +28,4 @@
"turbo": "2.3.3"
},
"packageManager": "npm@10.9.0"
}
}
16 changes: 16 additions & 0 deletions tooling/tailwind/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "@tech-companies-portugal/tailwind",
"version": "0.0.0",
"private": true,
"scripts": {
"clean": "git clean -xdf .turbo",
"lint": "biome check . --write"
},
"devDependencies": {
"@tech-companies-portugal/typescript": "*",
"tailwindcss": "^3.3.0"
},
"exports": {
".": "./tailwind.config.ts"
}
}
22 changes: 22 additions & 0 deletions tooling/tailwind/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import type { Config } from "tailwindcss";

const config = {
content: [
"./pages/**/*.{ts,tsx}",
"./components/**/*.{ts,tsx}",
"./app/**/*.{ts,tsx}",
"./src/**/*.{ts,tsx}",
],
theme: {
container: {
center: true,
padding: "2rem",
screens: {
"2xl": "1400px",
},
},
},
plugins: [],
} satisfies Config;

export default config;
5 changes: 5 additions & 0 deletions tooling/tailwind/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": "@tech-companies-portugal/typescript/base.json",
"include": ["tailwind.config.ts"],
"exclude": ["dist", "build", "node_modules"]
}
5 changes: 3 additions & 2 deletions tooling/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
"version": "0.0.0",
"scripts": {
"clean": "git clean -xdf .turbo",
"lint": "biome lint . --write"
"lint": "biome check . --write"
},
"files": [
"base.json",
"react-lib.json",
"nextjs.json"
"nextjs.json",
"tsup.config.json"
]
}
14 changes: 14 additions & 0 deletions tooling/typescript/tsup.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"entry": [
"index.ts"
],
"format": [
"cjs",
"esm"
],
"dts": true,
"splitting": false,
"sourcemap": false,
"clean": true,
"minify": true
}

0 comments on commit 5768b2a

Please sign in to comment.