{"id":13647085,"url":"https://github.com/commercialhaskell/stack-templates","last_synced_at":"2025-05-16T02:07:21.301Z","repository":{"id":34998418,"uuid":"39087328","full_name":"commercialhaskell/stack-templates","owner":"commercialhaskell","description":"Project templates for stack new","archived":false,"fork":false,"pushed_at":"2024-12-28T22:50:07.000Z","size":1261,"stargazers_count":235,"open_issues_count":2,"forks_count":111,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-09T11:07:07.075Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://haskellstack.org","language":"Haskell","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/commercialhaskell.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":"2015-07-14T16:39:43.000Z","updated_at":"2025-03-26T14:41:26.000Z","dependencies_parsed_at":"2024-08-02T01:25:35.164Z","dependency_job_id":"93410f0e-007c-4068-af14-cf25f6bf9d83","html_url":"https://github.com/commercialhaskell/stack-templates","commit_stats":{"total_commits":201,"total_committers":54,"mean_commits":"3.7222222222222223","dds":0.7562189054726368,"last_synced_commit":"6c4ca807086556e2b12dfa4917195849e3321d26"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercialhaskell%2Fstack-templates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercialhaskell%2Fstack-templates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercialhaskell%2Fstack-templates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercialhaskell%2Fstack-templates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/commercialhaskell","download_url":"https://codeload.github.com/commercialhaskell/stack-templates/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254453652,"owners_count":22073617,"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-08-02T01:03:19.952Z","updated_at":"2025-05-16T02:07:21.221Z","avatar_url":"https://github.com/commercialhaskell.png","language":"Haskell","funding_links":[],"categories":["Haskell"],"sub_categories":[],"readme":"## Project templates for Stack\n\nFrom Stack 1.9.1, Stack allows any GitHub, GitLab or Bitbucket repository named\n`stack-templates` to provide project templates for Stack. For example, a\ntemplate file at `username/stack-templates/my-template.hsfiles` on GitHub can be\nidentified as `username/my-template` when using `stack new`. For more\ninformation see the output of the `stack templates` command and its\n[documentation](https://docs.haskellstack.org/en/stable/templates_command/).\n\nThis repository provides the project template `new-template`, which is the\ndefault template used by `stack new`. It also provides `STACK_HELP.md`, which\nspecifies the output of the `stack templates` command.\n\nThis repository is the default one used by Stack and it provides 24 other\nproject templates. Information about some of those templates is included in\n`template-info.yaml` and this repository's Wiki.\n\nThose project templates are maintained but this repository is not accepting new\ntemplates because of the difficulties in maintaining large numbers of templates\ncentrally.\n\nThis repository's Wiki provides a place where the Haskell community can\nannounce the availability of project templates at other locations.\n\n## License\n\nAll the templates in this repository use identifiers from the\n[SPDX License List](https://spdx.org/licenses/) and all but two specify\n`BSD-3-Clause`.\n\nThe SPDX expression syntax was first required by the Cabal\nPackage Description Format Specification version 2.2 and that version is\nspecified in template Cabal files. Hpack will also detect that the use of\n`BSD-3-Clause` in a template `package.yaml` file requires `cabal-version: 2.2`\nin a Cabal file.\n\nStack, however, also supports versions of GHC that come with versions of the\n`Cabal` library before `Cabal-2.2.0.0`. If you are using such versions of GHC,\nedit the files produced by the template to replace `BSD-3-Clause` with `BSD3`\nand edit any Cabal files produced by the template to replace\n`cabal-version: 2.2` with `cabal-version: \u003e=1.10`.\n\n## Project template format\n\nEach project template is specified in an `.hsfiles` file, using the syntax of\nthe [Mustache](https://mustache.github.io/mustache.1.html) tool.\n\nEach file to be generated by the project template is specified with\n`START_FILE`, like this:\n\n```\n{-# START_FILE {{name}}.cabal #-}\nname:                {{name}}\nversion:             0.1.0.0\n...\n```\n\nParameters to the template are written `{{foo}}`. They are provided by users via\ntheir Stack `config.yaml` file, like this:\n\n``` yaml\ntemplates:\n  params:\n    author-email: chrisdone@gmail.com\n    author-name: Chris Done\n    copyright: 2023 Chris Done\n    github-username: chrisdone\n    category: Development\n```\n\nWhen the user runs `stack new my-project username/your-template` and they do not\nhave the parameters provided in their Stack `config.yaml`, Stack will warn the\nuser that such parameters were missing, like this:\n\n```\nDownloading template username/your-template to create project my-project in\ndirectory my-project/ ...\nDownloaded \u003cpath_to_username/your-template.hsfiles\u003e.\n\nNote: The following parameters were needed by the template but not provided:\n      author-email, and author-name.\n\n      You can provide them in Stack's global YAML configuration file\n      (\u003cpath_to_config.yaml\u003e) like this:\n\n      templates:\n        params:\n          author-email: value\n          author-name: value\n\n      Or you can pass each one on the command line as parameters like this:\n\n      stack new my-project username/your-template -p \"author-email:value\"\n      -p \"author-name:value\"\n```\n\nThe output of the template will yield a blank space where your parameter was. If\nyou want to provide default values for your template parameters, use this\nMustache syntax:\n\n```\nauthor:              {{author-name}}{{^author-name}}Author name here{{/author-name}}\n```\n\n## Related initiatives\n\nThe repository https://github.com/prikhi/stack-templatizer (unconnected with\nthis repository) provides Haskell source code to build an application that\nwill generate an `.hsfiles` file from the contents of a folder.\n\n## Yesod templates\n\nThe Yesod templates are generated from the\n[yesod-scaffold repo](https://github.com/yesodweb/yesod-scaffold). Please\nsend pull requests for those templates to that repository instead of this one.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommercialhaskell%2Fstack-templates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommercialhaskell%2Fstack-templates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommercialhaskell%2Fstack-templates/lists"}