Skip to content

Commit

Permalink
wip: remove tailwind as peer dep
Browse files Browse the repository at this point in the history
  • Loading branch information
jxom committed Oct 24, 2023
1 parent 21fbaee commit 5d77e06
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
6 changes: 3 additions & 3 deletions playgrounds/default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"private": true,
"type": "module",
"scripts": {
"dev": "bun ../../src/cli.ts",
"build": "NODE_ENV=production bun ../../src/cli.ts build",
"preview": "bun ../../src/cli.ts preview",
"dev": "bun ../../src/cli/index.ts",
"build": "NODE_ENV=production bun ../../src/cli/index.ts build",
"preview": "bun ../../src/cli/index.ts preview",
"dist:dev": "vocs",
"dist:build": "NODE_ENV=production vocs build",
"dist:preview": "vocs preview"
Expand Down
6 changes: 3 additions & 3 deletions playgrounds/tailwind/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"private": true,
"type": "module",
"scripts": {
"dev": "bun ../../src/cli.ts",
"build": "NODE_ENV=production bun ../../src/cli.ts build",
"preview": "bun ../../src/cli.ts preview"
"dev": "bun ../../src/cli/index.ts",
"build": "NODE_ENV=production bun ../../src/cli/index.ts build",
"preview": "bun ../../src/cli/index.ts preview"
},
"dependencies": {
"react": "^18.2.0",
Expand Down
9 changes: 2 additions & 7 deletions src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,7 @@
},
"peerDependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tailwindcss": "^3.3.3"
},
"peerDependenciesMeta": {
"tailwindcss": {
"optional": true
}
"react-dom": "^18.2.0"
},
"dependencies": {
"@jmoxey/rehype-pretty-code": "^0.10.2-1",
Expand Down Expand Up @@ -52,6 +46,7 @@
"serve-static": "^1.15.0",
"shiki": "^0.14.5",
"shiki-processor": "^0.1.3",
"tailwindcss": "^3.3.3",
"ua-parser-js": "^1.0.36",
"unist-util-visit": "^5.0.0",
"vite": "4.4.11"
Expand Down
3 changes: 3 additions & 0 deletions src/vite/plugins/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { accessSync } from 'node:fs'
import { resolve } from 'node:path'
import { default as autoprefixer } from 'autoprefixer'
import { default as tailwindcss } from 'tailwindcss'
// @ts-expect-error
import { default as tailwindcssNesting } from 'tailwindcss/nesting'
import type { PluginOption } from 'vite'
import { postcssRawStyles } from './postcss/rawStyles.js'

Expand All @@ -17,6 +19,7 @@ export function css(): PluginOption {
plugins: [
postcssRawStyles(),
autoprefixer(),
tailwindcssNesting(),
tailwindConfig
? (tailwindcss as any)({
config: tailwindConfig,
Expand Down

0 comments on commit 5d77e06

Please sign in to comment.