Skip to content

Commit 8e11497

Browse files
committed
Generate sass file too
1 parent cb94821 commit 8e11497

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

pgml-apps/cargo-pgml-components/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pgml-apps/cargo-pgml-components/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cargo-pgml-components"
3-
version = "0.1.4"
3+
version = "0.1.5"
44
edition = "2021"
55
authors = ["PostgresML <team@postgresml.org>"]
66
license = "MIT"

pgml-apps/cargo-pgml-components/src/main.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,11 @@ fn add_component(name: String, overwrite: bool) {
388388
.expect("failed to write stimulus controller");
389389
drop(template_file);
390390

391+
// Create SASS file
392+
let sass_path = folder.join(&format!("{}.scss", component_path));
393+
let sass_file = File::create(sass_path).expect("failed to create sass file");
394+
drop(sass_file);
395+
391396
// let mut components_list = File::create("src/components/components.rs").expect("failed to create src/components/components.rs");
392397
// let components = read_dir("src/components").expect("failed to read components directory");
393398

0 commit comments

Comments
 (0)