Skip to content

Commit 0d67c0a

Browse files
authored
Remove SASS from generated projects and use standard CSS. Fixes #905 (#909)
1 parent 79ee19a commit 0d67c0a

File tree

5 files changed

+25
-23
lines changed

5 files changed

+25
-23
lines changed

src/browser_app_skeleton/package.json.ecr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"watch": "vite build --watch"
1515
},
1616
"devDependencies": {
17-
"sass": "^1.97.2",
1817
"vite": "^7.3.1",
1918
"vite-plugin-compression": "^0.5.1",
2019
"vite-plugin-dev-manifest": "^1.4.1"

src/browser_app_skeleton/src/css/app.scss.ecr renamed to src/browser_app_skeleton/src/css/app.css.ecr

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
1-
// Lucky generates 3 folders to help you organize your CSS:
2-
//
3-
// - src/css/variables # Files for colors, spacing, etc.
4-
// - src/css/mixins # Put your mixin functions in files here
5-
// - src/css/components # CSS for your components
6-
//
7-
// Remember to import your new CSS files or they won't be loaded:
8-
//
9-
// @import "./variables/colors" # Imports the file in src/css/variables/_colors.scss
10-
//
11-
// Note: Vite automatically resolves imports from node_modules
12-
// https://stackoverflow.com/questions/39535760/what-does-a-tilde-in-a-css-url-do
1+
/* Lucky generates 3 folders to help you organize your CSS:
2+
*
3+
* - src/css/variables # Files for colors, spacing, etc.
4+
* - src/css/mixins # Put your mixin functions in files here
5+
* - src/css/components # CSS for your components
6+
*
7+
* Remember to import your new CSS files or they won't be loaded:
8+
*
9+
* @import "./variables/colors";
10+
*
11+
* Note: Vite automatically resolves imports from node_modules
12+
* https://stackoverflow.com/questions/39535760/what-does-a-tilde-in-a-css-url-do
13+
*/
1314

1415
@import 'modern-normalize/modern-normalize.css';
15-
// Add your own components and import them like this:
16-
//
17-
// @import "components/my_new_component";
16+
/* Add your own components and import them like this:
17+
*
18+
* @import "components/my_new_component";
19+
*/
1820

19-
// Default Lucky styles.
20-
// Delete these when you're ready to bring in your own CSS.
21+
/* Default Lucky styles.
22+
* Delete these when you're ready to bring in your own CSS.
23+
*/
2124
body {
2225
font-family: system-ui, BlinkMacSystemFont, -apple-system, Segoe UI,
2326
Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue,

src/browser_app_skeleton/vite.config.js.ecr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ export default defineConfig({
2424
input: {
2525
// These entry names map to asset paths in Lucky:
2626
// "app" -> asset("js/app.js")
27-
// "styles" -> asset("css/app.scss")
27+
// "styles" -> asset("css/app.css")
2828
app: resolve(__dirname, 'src/js/app.js'),
29-
styles: resolve(__dirname, 'src/css/app.scss')
29+
styles: resolve(__dirname, 'src/css/app.css')
3030
}
3131
},
3232
// Asset output configuration

src/lucky_cli/browser_src_template.cr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ class BrowserSrcTemplate
8686
end
8787
end
8888
src_dir.add_folder("css") do |css_dir|
89-
css_dir.add_file("app.scss") do |io|
90-
ECR.embed("#{__DIR__}/../browser_app_skeleton/src/css/app.scss.ecr", io)
89+
css_dir.add_file("app.css") do |io|
90+
ECR.embed("#{__DIR__}/../browser_app_skeleton/src/css/app.css.ecr", io)
9191
end
9292
css_dir.add_folder("components/.keep")
9393
css_dir.add_folder("mixins/.keep")

src/web_app_skeleton/config/server.cr.ecr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Lucky::Server.configure do |settings|
2727
# Configure asset host for Vite
2828
if LuckyEnv.development?
2929
# In development, Vite serves assets from its dev server
30-
settings.asset_host = "http://localhost:3001"
30+
settings.asset_host = ""
3131
elsif LuckyEnv.production?
3232
# In production, Lucky serves the built assets
3333
# You could also use a CDN here:

0 commit comments

Comments
 (0)