chore: add template
This commit is contained in:
16
.github/template.yml
vendored
16
.github/template.yml
vendored
@@ -1,16 +0,0 @@
|
|||||||
name: Haskell Project Template
|
|
||||||
description: "Haskell project template"
|
|
||||||
inputs:
|
|
||||||
project_name:
|
|
||||||
description: "Name of your new project"
|
|
||||||
required: true
|
|
||||||
default: "haskell-template"
|
|
||||||
author_name:
|
|
||||||
description: "Author of the project"
|
|
||||||
required: true
|
|
||||||
default: "mincomk"
|
|
||||||
author_email:
|
|
||||||
description: "Author email of the project"
|
|
||||||
required: true
|
|
||||||
default: "mail@drchi.co.kr"
|
|
||||||
|
|
||||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1,5 +1,3 @@
|
|||||||
# Created by https://www.toptal.com/developers/gitignore/api/haskell
|
|
||||||
# Edit at https://www.toptal.com/developers/gitignore?templates=haskell
|
|
||||||
|
|
||||||
### Haskell ###
|
### Haskell ###
|
||||||
dist
|
dist
|
||||||
@@ -26,5 +24,4 @@ cabal.project.local~
|
|||||||
.HTF/
|
.HTF/
|
||||||
.ghc.environment.*
|
.ghc.environment.*
|
||||||
|
|
||||||
# End of https://www.toptal.com/developers/gitignore/api/haskell
|
example-project.cabal
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1,7 @@
|
|||||||
# {{ project_name }}
|
# example-project
|
||||||
|
|
||||||
|
## Build
|
||||||
|
```
|
||||||
|
hpack
|
||||||
|
cabal build
|
||||||
|
```
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
module Main where
|
module Main where
|
||||||
|
|
||||||
import Lib qualified (someFunc)
|
import Lib (someFunc)
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = do
|
main = do
|
||||||
putStrLn "Hello, Haskell!"
|
putStrLn "Hello, Haskell!"
|
||||||
Lib.someFunc
|
someFunc
|
||||||
|
|||||||
14
package.yaml
14
package.yaml
@@ -1,8 +1,8 @@
|
|||||||
name: {{ project_name }}
|
name: example-project
|
||||||
version: 0.1.0.0
|
version: 0.1.0.0
|
||||||
license: MIT
|
license: MIT
|
||||||
author: "{{ author_name }}"
|
author: "mincomk"
|
||||||
maintainer: "{{ author_email }}"
|
maintainer: "mail@drchi.co.kr"
|
||||||
extra-source-files:
|
extra-source-files:
|
||||||
- README.md
|
- README.md
|
||||||
|
|
||||||
@@ -23,23 +23,23 @@ library:
|
|||||||
- base
|
- base
|
||||||
|
|
||||||
executables:
|
executables:
|
||||||
{{ project_name }}:
|
example-project:
|
||||||
main: Main.hs
|
main: Main.hs
|
||||||
source-dirs: app
|
source-dirs: app
|
||||||
ghc-options: -threaded -rtsopts -with-rtsopts=-N
|
ghc-options: -threaded -rtsopts -with-rtsopts=-N
|
||||||
dependencies:
|
dependencies:
|
||||||
- base
|
- base
|
||||||
|
|
||||||
- {{ project_name }}
|
- example-project
|
||||||
|
|
||||||
tests:
|
tests:
|
||||||
{{ project_name }}-test:
|
example-project-test:
|
||||||
main: Main.hs
|
main: Main.hs
|
||||||
source-dirs: test
|
source-dirs: test
|
||||||
dependencies:
|
dependencies:
|
||||||
- base
|
- base
|
||||||
|
|
||||||
- {{ project_name }}
|
- example-project
|
||||||
|
|
||||||
- tasty
|
- tasty
|
||||||
- tasty-hunit
|
- tasty-hunit
|
||||||
|
|||||||
7
scripts/hello.hs
Executable file
7
scripts/hello.hs
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#! /usr/bin/env cabal
|
||||||
|
{- cabal:
|
||||||
|
build-depends: base
|
||||||
|
-}
|
||||||
|
|
||||||
|
main :: IO ()
|
||||||
|
main = putStrLn "Hello, world!"
|
||||||
@@ -19,7 +19,7 @@ main :: IO ()
|
|||||||
main = spec >>= defaultMain
|
main = spec >>= defaultMain
|
||||||
|
|
||||||
spec :: IO TestTree
|
spec :: IO TestTree
|
||||||
spec = return $ testGroup "{{ project_name }} tests" [baseTests]
|
spec = return $ testGroup "example tests" [baseTests]
|
||||||
|
|
||||||
baseTests :: TestTree
|
baseTests :: TestTree
|
||||||
baseTests =
|
baseTests =
|
||||||
|
|||||||
Reference in New Issue
Block a user