{"id":16981485,"url":"https://github.com/elgca/bootstrap-css-importor","last_synced_at":"2026-02-04T12:06:01.464Z","repository":{"id":245161271,"uuid":"817401375","full_name":"elgca/bootstrap-css-importor","owner":"elgca","description":"This demo is used to demonstrate how to incorporate Bootstrap CSS into ScalaJS, similar to the Scalawind project","archived":false,"fork":false,"pushed_at":"2024-06-19T18:26:58.000Z","size":127,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-11T03:59:57.114Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elgca.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-19T16:16:45.000Z","updated_at":"2024-06-21T02:55:23.000Z","dependencies_parsed_at":"2024-06-20T07:15:25.260Z","dependency_job_id":null,"html_url":"https://github.com/elgca/bootstrap-css-importor","commit_stats":null,"previous_names":["elgca/bootstrap-css-importor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/elgca/bootstrap-css-importor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elgca%2Fbootstrap-css-importor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elgca%2Fbootstrap-css-importor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elgca%2Fbootstrap-css-importor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elgca%2Fbootstrap-css-importor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elgca","download_url":"https://codeload.github.com/elgca/bootstrap-css-importor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elgca%2Fbootstrap-css-importor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29084088,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T03:31:03.593Z","status":"ssl_error","status_checked_at":"2026-02-04T03:29:50.742Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T02:05:37.480Z","updated_at":"2026-02-04T12:06:01.445Z","avatar_url":"https://github.com/elgca.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bootstrap-css-importor\nThis demo is used to demonstrate how to incorporate Bootstrap CSS into ScalaJS, similar to the Scalawind project\n\n## CSS To Scala Generator\n\nThis is a pre compiled generator built in SBT,\nwhich runs before each compilation of code to generate\n[scalabootstrap.scala](src/main/scala/scalabootstrap/scalabootstrap.scala)。\n\nOr manually start it by:\n```shell\nnpm install\nsbt bootstrap\n```\n\n# Start\n\n```shell\n# terminal1: start scalajs\nsbt cup\n# terminal2: start vite\nnpm run dev\n```\n\n\n\nThere is a small trouble. \nThe generator is executed before compile, \nand the CSS file does not in SBT watch.\nAfter CSS change, it is necessary to edit any scala file to trigger compile.\n\nThe template of scalabootstrap.scala comes from Scalawind.\n\n## Any CSS Supported\n\nJust modify the configuration directory in build.sbt to add any CSS to the generator,\nand any CSS can be added to it\n\n```scala\nbootstrap := {\n  CodeGeneratorScalaBootstrap.generate(\n      rootPaths = Seq(\n          \"./node_modules/@tabler/core/dist/css\",\n          \"./style.css\",\n          \"./src/\", // watch custom css\n      ).map(java.nio.file.Path.of(_)),\n      targetPath = java.nio.file.Path\n        .of(\"./src/main/scala/scalabootstrap/\"),\n      packageName = \"scalabootstrap\",\n      objectName = \"scalabootstrap\",\n      fileFilter = (path: java.nio.file.Path) =\u003e {\n        if (path.toString.contains(\"node_modules\")) {\n          val fileName = path.toFile.getName()\n          fileName.endsWith(\".min.css\")\n        } else {\n          true\n        }\n      },\n  )\n}\n```\n\nEdit App.css\n\n```css\n\n.test-demo {\n    background-color: aliceblue;\n}\n\n\n.test2 {\n    text-align: center;\n}\n```\n\nyou can do in App.scala like this:\n\n```scala\n      println(btsp.test2.css)\n      println(btsp.`test-demo`.css)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felgca%2Fbootstrap-css-importor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felgca%2Fbootstrap-css-importor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felgca%2Fbootstrap-css-importor/lists"}