Skip to content

Commit

Permalink
rework deps
Browse files Browse the repository at this point in the history
  • Loading branch information
inetol committed Nov 20, 2024
1 parent cfe91ca commit e0375db
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 34 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ jobs:
with:
persist-credentials: false

- name: Setup production dependencies
run: bun install --frozen-lockfile --production
- name: Setup dependencies
run: bun install --frozen-lockfile

- name: Run build:server
run: bun run build:server
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,11 @@ jobs:
with:
persist-credentials: false

- name: Setup production dependencies
run: bun install --frozen-lockfile --production
- name: Setup dependencies
run: bun install --frozen-lockfile

- name: Run build:server
run: bun run build:server

- name: Setup development dependencies
run: bun install --frozen-lockfile

- name: Run lint
run: bun run lint
Binary file modified bun.lockb
Binary file not shown.
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "module",
"scripts": {
"analyse:bundle": "bun run analyze:bundle",
"analyze:bundle": "rm -rf ./dist/ && bun vite-bundle-visualizer --sourcemap --output ./dist/bundle.html",
"analyze:bundle": "rm -rf ./dist/ && bun vite build && mv ./dist/client/bundle.html ./dist/client.bundle.html && mv ./dist/server/bundle.html ./dist/server.bundle.html",
"build": "bun run build:server",
"build:server": "rm -rf ./dist/ && bun vite build && bun run script:standalone && bun run script:compress",
"clean:git:all": "bun run clean:git:untracked && bun run clean:git:gc && bun run clean:git:hooks",
Expand Down Expand Up @@ -52,27 +52,27 @@
"@solid-primitives/scheduled": "~1.4.4",
"@solid-primitives/storage": "~4.2.1",
"@tabler/icons-solidjs": "~3.22.0",
"@tailwindcss/postcss": "4.0.0-alpha.34",
"@types/bun": "~1.1.13",
"@types/node": "~22.9.0",
"@uiw/codemirror-extensions-hyper-link": "~4.23.6",
"@uiw/codemirror-themes": "~4.23.6",
"daisyui": "5.0.0-alpha.37",
"daisyui": "5.0.0-alpha.38",
"env-var": "~7.5.0",
"hono": "~4.6.10",
"postcss": "~8.4.49",
"hono": "~4.6.11",
"solid-js": "~1.9.3",
"tailwindcss": "4.0.0-alpha.34",
"typescript": "~5.6.3",
"vike": "~0.4.201",
"vike": "~0.4.204",
"vike-solid": "~0.7.6",
"vite": "~5.4.11"
},
"devDependencies": {
"@biomejs/biome": "~1.9.4",
"lefthook": "~1.8.2",
"sort-package-json": "~2.10.1",
"vite-bundle-visualizer": "~1.2.1"
"@tailwindcss/vite": "4.0.0-alpha.35",
"@types/bun": "^1.1.13",
"browserslist": "^4.24.2",
"lefthook": "~1.8.4",
"rollup-plugin-visualizer": "~5.12.0",
"sort-package-json": "~2.11.0"
},
"peerDependencies": {
"typescript": "5.5.4"
},
"trustedDependencies": [
"@biomejs/biome",
Expand Down
5 changes: 0 additions & 5 deletions postcss.config.js

This file was deleted.

2 changes: 2 additions & 0 deletions scripts/standalone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ const buildStandalone = async () => {
await $`rm -rf ./dist/server/chunks/`;
await $`rm -rf ./dist/server/entries/`;
await $`rm -rf ./dist/server/*.mjs`;

await $`rm -rf ./dist/client/bundle.html`;
};

console.info('[BUILD] Creating standalone...');
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"noImplicitReturns": true,
"noPropertyAccessFromIndexSignature": false,
"noUncheckedIndexedAccess": true,
"noUncheckedSideEffectImports": true,
//"noUncheckedSideEffectImports": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"verbatimModuleSyntax": true,
Expand Down
37 changes: 29 additions & 8 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
import { resolve } from 'node:path';
import tailwindcss from '@tailwindcss/vite';
import browserslist from 'browserslist';
import { browserslistToTargets } from 'lightningcss';
import { visualizer } from 'rollup-plugin-visualizer';
import solid from 'vike-solid/vite';
import vike from 'vike/plugin';
import type { UserConfig } from 'vite';

export default {
appType: 'custom',
build: {
reportCompressedSize: false
reportCompressedSize: false,
cssMinify: 'lightningcss'
},
resolve: {
alias: {
'@x-component': resolve('./src/components'),
'@x-hook': resolve('./src/hooks'),
'@x-page': resolve('./src/pages'),
'@x-util': resolve('./src/utils')
css: {
transformer: 'lightningcss',
lightningcss: {
targets: browserslistToTargets(browserslist('defaults'))
}
},
json: {
stringify: true
},
plugins: [
solid(),
tailwindcss(),
vike({
redirects: {
'/github': 'https://github.com/jspaste',
Expand All @@ -27,6 +35,19 @@ export default {
prerender: {
partial: true
}
}),
visualizer({
emitFile: true,
filename: 'bundle.html',
template: 'treemap'
})
]
],
resolve: {
alias: {
'@x-component': resolve('./src/components'),
'@x-hook': resolve('./src/hooks'),
'@x-page': resolve('./src/pages'),
'@x-util': resolve('./src/utils')
}
}
} satisfies UserConfig;

0 comments on commit e0375db

Please sign in to comment.