File tree Expand file tree Collapse file tree 15 files changed +40
-179
lines changed
Expand file tree Collapse file tree 15 files changed +40
-179
lines changed Original file line number Diff line number Diff line change 6868 password : postgres
6969 port : 5432
7070 postgres-version : 18
71- - uses : actions /setup-node@v6
71+ - uses : oven-sh /setup-bun@v2
7272 with :
73- node-version : 24
74- - name : Enable Corepack (for yarn)
75- run : |
76- corepack enable
77- corepack prepare yarn@1.22.22 --activate
78- yarn --version
73+ bun-version : latest
7974 - uses : crystal-lang/install-crystal@v1
8075 with :
8176 crystal : latest
@@ -110,14 +105,9 @@ jobs:
110105 password : postgres
111106 port : 5432
112107 postgres-version : 18
113- - uses : actions /setup-node@v6
108+ - uses : oven-sh /setup-bun@v2
114109 with :
115- node-version : 24
116- - name : Enable Corepack (for yarn)
117- run : |
118- corepack enable
119- corepack prepare yarn@1.22.22 --activate
120- yarn --version
110+ bun-version : latest
121111 - uses : crystal-lang/install-crystal@v1
122112 with :
123113 crystal : latest
Original file line number Diff line number Diff line change 77 "modern-normalize": "^3.0.1"
88 },
99 "scripts": {
10- "heroku-postbuild": "yarn build",
11- "dev": "vite",
12- "build": "vite build",
13- "preview": "vite preview",
14- "watch": "vite build --watch"
15- },
16- "devDependencies": {
17- "vite": "^7.3.1",
18- "vite-plugin-compression": "^0.5.1",
19- "vite-plugin-dev-manifest": "^1.4.1"
10+ "build": "bun lib/lucky/src/bun/bake.js",
11+ "dev": "bun run build --dev",
12+ "prod": "bun run build --prod"
2013 }
2114}
Original file line number Diff line number Diff line change @@ -11,8 +11,12 @@ class Shared::LayoutHead < BaseComponent
1111 responsive_meta_tag
1212
1313 # Development helper used with the `lucky watch` command.
14- # Reloads the browser when files are updated.
14+ # Reloads the browser when Crystal files are updated.
1515 live_reload_connect_tag if LuckyEnv.development?
16+
17+ # Development helper used with the `bun run dev` command.
18+ # Reloads the browser when asset files are updated.
19+ bun_reload_connect_tag if LuckyEnv.development?
1620 end
1721 end
1822end
Original file line number Diff line number Diff line change 88*
99* @import "./variables/colors";
1010*
11- * Note: Vite automatically resolves imports from node_modules
12- * https://stackoverflow.com/questions/39535760/what-does-a-tilde-in-a-css-url-do
1311*/
1412
1513@import 'modern-normalize/modern-normalize.css';
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -103,9 +103,8 @@ class LuckyCli::Generators::Web
103103 ignore_list.concat([
104104 " /public/js" ,
105105 " /public/css" ,
106- " /public/.vite" ,
107106 " /public/assets" ,
108- " /public/manifest.dev .json" ,
107+ " /public/* manifest* .json" ,
109108 " /node_modules" ,
110109 " yarn-error.log" ,
111110 ])
Original file line number Diff line number Diff line change @@ -12,9 +12,6 @@ class BrowserSrcTemplate
1212
1313 def template_folder
1414 LuckyTemplate .create_folder do |root_dir |
15- root_dir.add_file(" vite.config.js" ) do |io |
16- ECR .embed(" #{ __DIR__ } /../browser_app_skeleton/vite.config.js.ecr" , io)
17- end
1815 root_dir.add_file(" package.json" ) do |io |
1916 ECR .embed(" #{ __DIR__ } /../browser_app_skeleton/package.json.ecr" , io)
2017 end
@@ -30,7 +27,6 @@ class BrowserSrcTemplate
3027 public_dir.add_file(" favicon.ico" ) do |io |
3128 ECR .embed(" #{ __DIR__ } /../browser_app_skeleton/public/favicon.ico.ecr" , io)
3229 end
33- # Vite generates its manifest automatically
3430 public_dir.add_file(" robots.txt" ) do |io |
3531 ECR .embed(" #{ __DIR__ } /../browser_app_skeleton/public/robots.txt.ecr" , io)
3632 end
Original file line number Diff line number Diff line change @@ -37,8 +37,8 @@ class LuckyCli::Wizard::Web
3737 Full (recommended for most apps)
3838
3939 ● Great for server rendered HTML or Single Page Applications
40- ● Vite included for fast development and optimized builds
41- ● Setup to compile CSS and JavaScript
40+ ● Use Bun for fast development and optimized builds
41+ ● Setup to compile CSS and Javascript/Typescript
4242 ● Support for rendering HTML
4343
4444 API
Original file line number Diff line number Diff line change @@ -3,5 +3,5 @@ system_check: crystal script/system_check.cr
33web: lucky watch
44<% - else - %>
55web: lucky watch --reload-browser
6- assets: yarn dev
6+ assets: bun run dev
77<% - end - %>
Original file line number Diff line number Diff line change @@ -21,9 +21,9 @@ Lucky::Server.configure do |settings|
2121 settings.port = Lucky::ServerSettings.port
2222 end
2323
24- # Configure asset host for Vite
24+ # Configure asset host
2525 if LuckyEnv.development?
26- # In development, Vite serves assets from its dev server
26+ # In development, assets are served from the dev server
2727 settings.asset_host = ""
2828 elsif LuckyEnv.production?
2929 # In production, Lucky serves the built assets
You can’t perform that action at this time.
0 commit comments