{"id":18088203,"url":"https://github.com/yurique/laminar-snowpack-example","last_synced_at":"2025-04-13T03:09:39.993Z","repository":{"id":93245477,"uuid":"331526529","full_name":"yurique/laminar-snowpack-example","owner":"yurique","description":"An example of a Snowpack build for a Scala.js + Laminar + frontroute app.","archived":false,"fork":false,"pushed_at":"2021-06-03T21:41:22.000Z","size":503,"stargazers_count":12,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T03:09:25.757Z","etag":null,"topics":["embedded-files","postcss","scala","scala-3","scalajs","snowpack","tailwindcss"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yurique.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-01-21T05:39:56.000Z","updated_at":"2021-11-26T14:19:00.000Z","dependencies_parsed_at":"2023-08-25T04:15:51.334Z","dependency_job_id":null,"html_url":"https://github.com/yurique/laminar-snowpack-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurique%2Flaminar-snowpack-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurique%2Flaminar-snowpack-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurique%2Flaminar-snowpack-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurique%2Flaminar-snowpack-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yurique","download_url":"https://codeload.github.com/yurique/laminar-snowpack-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248657917,"owners_count":21140846,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["embedded-files","postcss","scala","scala-3","scalajs","snowpack","tailwindcss"],"created_at":"2024-10-31T17:12:10.443Z","updated_at":"2025-04-13T03:09:39.964Z","avatar_url":"https://github.com/yurique.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# laminar-snowpack-example\n\nAn example of a [Snowpack](https://www.snowpack.dev/) build for a [Scala.js](https://scala-js.org) + [Laminar](https://github.com/raquo/Laminar) +\n[frontroute](https://github.com/tulz-app/frontroute) app.\n\nNote that Snowpack is not a fit for every project:\n\n\u003e Snowpack is a lightning-fast frontend build tool, designed for the modern web. \n\u003e It is an alternative to heavier, more complex bundlers like webpack or Parcel \n\u003e in your development workflow. Snowpack leverages JavaScript's native module\n\u003e system (known as ESM) to avoid unnecessary work and stay fast no matter\n\u003e how big your project grows.\n\n## embedded-files\n\nThis app also demonstrates how to use the [embedded-files](https://github.com/yurique/embedded-files/) – sbt plugin and\nthe macro – to effectively achieve \"resources\" in Scala.js.\n\n## tailwindcss\n\nThe app is styled with [tailwindcss](https://tailwindcss.com/).\n\nFor this, the [PostCSS](https://postcss.org/) plugin for Snowpack is installed, and PostCSS \nis configured to run the tailwindcss plugin (as well as the [postcss-preset-env](https://preset-env.cssdb.org/) plugin).\n\nWhen building a production release, PostCSS will also run the [CSSNANO](https://cssnano.co/) plugin and tailwindcss plugin\nwill also purge the unused classes from the generated `.css` file.\n\n## installing npm dependencies\n\n```console\n$ yarn install\n```\n\n## dev server\n\nIn sbt:\n```\nsbt:laminar-snowpack-example\u003e fastLinkJS\n// OR, if you want sbt to watch the source changes and rebuild continuosly\nsbt:laminar-snowpack-example\u003e ~fastLinkJS\n```\n\nThen, start the Snowpack dev server (from a terminal – this is *not* a sbt command):\n\n```console\n$ yarn run snowpack dev\n```\n\n## production build\n\nIn sbt:\n```\nsbt:laminar-snowpack-example\u003e fullLinkJS\n```\n\nRun the Snowpack `build` command:\n\n```console\n$ yarn run snowpack build\n```\n\nThe assets will end up in the `build` directory.\n\n(main.js – `1.5M`, with brotli - `130K`, with gzip – `188K`)\n\n## Scala 3\n\nYou can build this app with Scala 3:\n\n* uncomment the corresponging line in the `build.sbt` (and comment the other one)\n* do the same in the `snowpack.config.js`\n* restart sbt and Snowpack, and follow the steps above\n\n## tailwind\n\ntailwindcss is configured to run in `jit` mode, but this feature is not yet polished \nand sometimes it misses the classes that are actually used when `fastLinkJS` emits\na new `.js`,\n\nIf that's the case, you can either restart the snowpack or comment out this line in\n`website/tailwind.config.js`:\n\n```\n    mode: 'jit',\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyurique%2Flaminar-snowpack-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyurique%2Flaminar-snowpack-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyurique%2Flaminar-snowpack-example/lists"}