Skip to content

Commit 5cf4f41

Browse files
authored
Merge pull request #2 from Boston343/next
v2.0.0 tailwindcss v4
2 parents df7f60f + d4a39e6 commit 5cf4f41

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+10119
-11910
lines changed

.npmrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
auto-install-peers=true
2+
node-linker=hoisted
3+
lockfile=true

.prettierignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Ignore artifacts:
2+
dist
3+
.astro
4+
5+
# Ignore node_modules
6+
node_modules
7+
8+
# Ingore netlify folders
9+
.netlify
10+
netlify
11+
12+
# Ignore MDX files as Keystatic expects a specific JSX component structure
13+
# IF using Keystatic, I recommend uncommenting the below line so you don't accidentally format things incorrectly
14+
# **/*.mdx
15+
16+
# Ignore tours
17+
.tours
18+
19+
# Standard
20+
**/.git
21+
**/.svn
22+
**/.hg
23+
**/node_modules

.prettierrc.mjs

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
/** @type {import("prettier").Config} */
22
export default {
3+
printWidth: 100,
4+
semi: true,
5+
singleQuote: false,
6+
tabWidth: 2,
7+
trailingComma: "all",
8+
useTabs: true,
39
plugins: ["prettier-plugin-astro", "prettier-plugin-tailwindcss"],
410
overrides: [
511
{
6-
files: "*.astro",
12+
files: [".*", "*.md", "*.toml", "*.yml"],
13+
options: {
14+
useTabs: false,
15+
},
16+
},
17+
{
18+
files: ["**/*.astro"],
719
options: {
820
parser: "astro",
921
},

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The source files have the following setup. Note that not all files are listed he
5656
│ │ ├── 404.astro
5757
│ │ └── index.astro
5858
│ ├── styles/
59-
│ │ └── global.scss
59+
│ │ └── global.css
6060
│ └── content.config.ts
6161
├── .gitignore
6262
├── .prettierrc.mjs
@@ -65,7 +65,6 @@ The source files have the following setup. Note that not all files are listed he
6565
├── package.json
6666
├── package-lock.json
6767
├── README.md
68-
├── tailwind.config.cjs
6968
└── tsconfig.json
7069
```
7170

astro.config.mjs

+46-50
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,57 @@
11
import { defineConfig } from "astro/config";
22

3+
import tailwindcss from "@tailwindcss/vite";
34
import icon from "astro-icon"; // https://www.astroicon.dev/guides/upgrade/v1/
45
import mdx from "@astrojs/mdx";
56
import sitemap from "@astrojs/sitemap";
6-
import tailwind from "@astrojs/tailwind";
77
import compress from "@playform/compress";
88
import AutoImport from "astro-auto-import";
99

1010
// https://astro.build/config
1111
export default defineConfig({
12-
site: "https://horizon.cosmicthemes.com",
13-
integrations: [
14-
// example auto import component into blog post mdx files
15-
AutoImport({
16-
imports: [
17-
// https://github.com/delucis/astro-auto-import
18-
"@components/Admonition/Admonition.astro",
19-
],
20-
}),
21-
mdx(),
22-
tailwind(),
23-
icon({
24-
// I include only the icons I use. This is because if you use SSR, ALL icons will be included (no bueno)
25-
// https://www.astroicon.dev/reference/configuration#include
26-
include: {
27-
tabler: [
28-
"bulb",
29-
"alert-triangle",
30-
"flame",
31-
"info-circle",
32-
"arrow-narrow-left",
33-
"arrow-narrow-right",
34-
"menu-2",
35-
"x",
36-
"chevron-down",
37-
"category",
38-
"calendar-event",
39-
],
40-
},
41-
}),
42-
sitemap(),
43-
compress({
44-
HTML: true,
45-
JavaScript: true,
46-
CSS: false,
47-
Image: false, // astro:assets handles this. Enabling this can dramatically increase build times
48-
SVG: false, // astro-icon handles this
49-
}),
50-
],
51-
// get rid of Dart Sass deprecation warning
52-
vite: {
53-
css: {
54-
preprocessorOptions: {
55-
scss: {
56-
api: "modern-compiler",
57-
},
58-
},
59-
},
60-
},
12+
site: "https://horizon.cosmicthemes.com",
13+
integrations: [
14+
// example auto import component into blog post mdx files
15+
AutoImport({
16+
imports: [
17+
// https://github.com/delucis/astro-auto-import
18+
"@components/Admonition/Admonition.astro",
19+
],
20+
}),
21+
mdx(),
22+
icon({
23+
// I include only the icons I use. This is because if you use SSR, ALL icons will be included (no bueno)
24+
// https://www.astroicon.dev/reference/configuration#include
25+
include: {
26+
tabler: [
27+
"bulb",
28+
"alert-triangle",
29+
"flame",
30+
"info-circle",
31+
"arrow-narrow-left",
32+
"arrow-narrow-right",
33+
"menu-2",
34+
"x",
35+
"chevron-down",
36+
"category",
37+
"calendar-event",
38+
],
39+
},
40+
}),
41+
sitemap(),
42+
compress({
43+
HTML: true,
44+
JavaScript: true,
45+
CSS: true,
46+
Image: false, // astro:assets handles this. Enabling this can dramatically increase build times
47+
SVG: false, // astro-icon handles this
48+
}),
49+
],
50+
vite: {
51+
plugins: [tailwindcss()],
52+
// stop inlining short scripts to fix issues with ClientRouter: https://github.com/withastro/astro/issues/12804
53+
build: {
54+
assetsInlineLimit: 0,
55+
},
56+
},
6157
});

0 commit comments

Comments
 (0)