{"id":21874185,"url":"https://github.com/eeue56/elm-init-scripts","last_synced_at":"2025-04-15T01:16:26.692Z","repository":{"id":142126848,"uuid":"55277522","full_name":"eeue56/elm-init-scripts","owner":"eeue56","description":null,"archived":false,"fork":false,"pushed_at":"2017-02-05T22:48:30.000Z","size":7,"stargazers_count":25,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-15T01:16:09.917Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eeue56.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":"2016-04-02T04:24:13.000Z","updated_at":"2022-04-14T22:45:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"7d74790f-16ed-4805-b277-6b255e2f78b9","html_url":"https://github.com/eeue56/elm-init-scripts","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/eeue56%2Felm-init-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eeue56%2Felm-init-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eeue56%2Felm-init-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eeue56%2Felm-init-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eeue56","download_url":"https://codeload.github.com/eeue56/elm-init-scripts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248986315,"owners_count":21194025,"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":[],"created_at":"2024-11-28T07:11:27.592Z","updated_at":"2025-04-15T01:16:26.677Z","avatar_url":"https://github.com/eeue56.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# elm-init-scripts\n\n\nThis is a script to bootstrap your projects in the style that NRI uses internally.\n\nThis script supports Elm version `0.18.0`\n\n## Usage:\n\n```bash\npython bootstrap.py Some.Module.Name app/assets/javascripts/\n```\n\nDon't forget to update `elm-package.json` to include the chosen source directory:\n```json\n{\n    ...\n    \"source-directories\": [\n        \".\"\n        ...\n      , \"./src\"\n    ],\n    ...\n    \"dependencies\": {\n        \"elm-lang/core\": \"5.0.0 \u003c= v \u003c 6.0.0\",\n        \"elm-lang/html\": \"2.0.0 \u003c= v \u003c 3.0.0\"\n    },\n    \"elm-version\": \"0.18.0 \u003c= v \u003c 0.19.0\"\n}\n```\n\nThe script should generate the following files:\n\n`app/assets/javascripts/Some/Module/Name/API.js.elm`\n```elm\nmodule Some.Module.Name.API where\nmodule Some.Module.Name.API exposing (main)\n\nimport Html exposing (Html)\n\nimport Some.Module.Name.Messages exposing (Msg(..))\nimport Some.Module.Name.Subscriptions exposing (subscriptions)\nimport Some.Module.Name.Model exposing (Model)\nimport Some.Module.Name.Update exposing (update)\nimport Some.Module.Name.View exposing (view)\n\ninitialModel : Model\ninitialModel = { }\n\ninit : ( Model, Cmd Msg )\ninit =\n  ( initialModel\n  , Cmd.none )\n\nmain =\n Html.program\n   { init = init\n   , update = update\n   , view = view\n   , subscriptions = \\_ -\u003e Sub.none }\n```\n`app/assets/javascripts/Some/Module/Name/Update.elm`\n```elm\nmodule Some.Module.Name.Update exposing (update)\n\nimport Some.Module.Name.Model exposing (Model)\nimport Some.Module.Name.Messages exposing (Msg(..))\n\nupdate : Msg -\u003e Model -\u003e (Model, Cmd Msg)\nupdate msg model =\n  case msg of\n    NoOp -\u003e\n      (model, Cmd.none)\n```\n`app/assets/javascripts/Some/Module/Name/Model.elm`\n```elm\nmodule Some.Module.Name.Model where\n\ntype alias Model =\n  {}\n```\n`app/assets/javascripts/Some/Module/Name/View.elm`\n```elm\nmodule Some.Module.Name.View exposing (view)\n\nimport Html exposing (..)\nimport Html.Attributes exposing (..)\nimport Html.Events exposing (..)\n\nimport Some.Module.Name.Model exposing (Model)\nimport Some.Module.Name.Messages exposing (Msg(..))\n\nview : Model -\u003e Html Msg\nview model =\n  div [] [ text \"Hello world!\" ]\n```\n`app/assets/javascripts/Some/Module/Name/Messages.elm`\n```elm\nmodule Some.Module.Name.Messages exposing (Msg(..))\n\ntype Msg\n  = NoOp\n```\n`app/assets/javascripts/Some/Module/Name/Subscriptions.elm`\n```elm\nmodule Some.Module.Name.Subscriptions exposing (subscriptions)\n\nimport Some.Module.Name.Model exposing (Model)\nimport Some.Module.Name.Messages exposing (Msg(..))\n\nsubscriptions : Model -\u003e Sub Msg\nsubscriptions model =\n  Sub.none\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feeue56%2Felm-init-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feeue56%2Felm-init-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feeue56%2Felm-init-scripts/lists"}