{"id":15808709,"url":"https://github.com/ptrdom/scalajs-electron-quick-start","last_synced_at":"2025-04-21T07:32:59.261Z","repository":{"id":54397182,"uuid":"514779843","full_name":"ptrdom/scalajs-electron-quick-start","owner":"ptrdom","description":"electron-quick-start conversion to Scala.js","archived":false,"fork":false,"pushed_at":"2024-01-13T06:08:47.000Z","size":75,"stargazers_count":6,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-06T03:05:41.558Z","etag":null,"topics":["electron","javascript","nodejs","quickstart","scalajs"],"latest_commit_sha":null,"homepage":"","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/ptrdom.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":"2022-07-17T07:49:33.000Z","updated_at":"2024-05-08T14:47:02.000Z","dependencies_parsed_at":"2024-10-26T09:09:14.120Z","dependency_job_id":"26c6276b-b1d3-4ca0-9ffc-e44bcd405812","html_url":"https://github.com/ptrdom/scalajs-electron-quick-start","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptrdom%2Fscalajs-electron-quick-start","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptrdom%2Fscalajs-electron-quick-start/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptrdom%2Fscalajs-electron-quick-start/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptrdom%2Fscalajs-electron-quick-start/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ptrdom","download_url":"https://codeload.github.com/ptrdom/scalajs-electron-quick-start/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250014794,"owners_count":21361011,"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":["electron","javascript","nodejs","quickstart","scalajs"],"created_at":"2024-10-05T03:05:49.912Z","updated_at":"2025-04-21T07:32:59.252Z","avatar_url":"https://github.com/ptrdom.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# scalajs-electron-quick-start\n\n**[electron-quick-start](https://github.com/electron/electron-quick-start) conversion to [Scala.js](https://www.scala-js.org/)**\n\n\u003e :warning: This template is more of an experiment and does not provide the best workflows for developing\n\u003e and building applications. If you need proper dev server implementation with hot reload and module bundler support,\n\u003e please check out following plugins:\n\u003e \n\u003e - https://github.com/ptrdom/scalajs-esbuild?tab=readme-ov-file#electron-plugin\n\u003e - https://github.com/ptrdom/scalajs-vite?tab=readme-ov-file#electron\n\u003e \n\u003e Recommendation is to try out esbuild, because esbuild is faster than vite (rollup).\n\n## How to run\n\nRequires `npm` to be installed in the system.\n\nRun `sbt app/electronStart`.\n\n## Design\n\nThe application is split into five `sbt` modules to fit a project structure that works well with Scala.js and the\n[security guidelines](https://www.electronjs.org/docs/latest/tutorial/security) outlined in Electron documentation:\n \n- `app`\n  - Combines Scala.js output of other modules with additional resources into an Electron application.\n  - Implements a simple Electron `sbt` plugin with following tasks:\n    - `app/electronInstall` - copies over resources (`index.html`, `package.json`, `package-lock.json`, `styles.css`) \n      to target directory and runs `npm install`.\n    - `app/electronCompile` - compiles Scala.js modules, copies output to target directory.\n    - `app/electronStart` - runs `npm start` on target directory.\n- `main`\n  - Contains `main` process of the [Electron Process Model](https://www.electronjs.org/docs/latest/tutorial/process-model).\n  - Can use `Node.js` APIs and `CommonJS` modules.\n- `preload`\n  - Contains `preload` script.\n  - Can use a [polyfilled subset](https://www.electronjs.org/docs/latest/tutorial/sandbox#preload-scripts) of `Node.js`\n    APIs, so it does use `CommonJS` modules, but can only `require` a subset of them.\n- `node-shared`\n  - Contains Scala.js facades that can be shared between `main` and `preload` modules.\n- `renderer`\n  - Contains `renderer` process of the Electron Process Model. \n  - Because it used for producing \n  web content and browsers do not have built-in support `CommonJS` modules, it is built separately\n  as a single bundle.\n\n`scalaJSStage` setting in `main`, `preload` and `renderer` modules can be used to toggle between `FastLinkJS` and `FullLinkJS` output.\n\n## License\n\nThis software is licensed under the MIT license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fptrdom%2Fscalajs-electron-quick-start","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fptrdom%2Fscalajs-electron-quick-start","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fptrdom%2Fscalajs-electron-quick-start/lists"}