• Stars
    star
    202
  • Rank 193,691 (Top 4 %)
  • Language
    Haskell
  • License
    BSD 3-Clause "New...
  • Created over 11 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Generate scaffold for a Haskell project

hi Build StatusCoverage StatusHackage

Generate scaffold for a Haskell project

Overview

This application generates a scaffold for Haskell project from a Git repository. The template can be specified by Git repository. hi-hspec will be used as a default template.

Usage

Basic Example

$ hi foo-bar-baz
Creating new project with git repository:git://github.com/fujimura/hi-hspec.git
    create  foo-bar-baz/.gitignore
    create  foo-bar-baz/LICENSE
    create  foo-bar-baz/README.md
    create  foo-bar-baz/foo-bar-baz.cabal
    create  foo-bar-baz/src/Foo/Bar/Baz.hs
    create  foo-bar-baz/src/Foo/Bar/Baz/Internal.hs
    create  foo-bar-baz/test/Foo/Bar/BazSpec.hs
    create  foo-bar-baz/test/Spec.hs

Specifying template

Specifying repository in GitHub has a shorthand like this:

$ hi foo-bar-baz --repository gh:fujimura/hi-flat
Creating new project from repository: [email protected]:fujimura/hi-flat.git
    create  foo-bar-baz/.gitignore
    create  foo-bar-baz/LICENSE
    create  foo-bar-baz/Main.hs
    create  foo-bar-baz/Foo/Bar/Baz.hs
    create  foo-bar-baz/README.md
    create  foo-bar-baz/foo-bar-baz.cabal

Options

  -h,--help                Show this help text
  -v,--version             Print version information
  -p,--package-name ARG    Name of package
  -m,--moduleName ARG      Name of Module
  -a,--author ARG          Name of the project's author
  -e,--email ARG           Email address of the maintainer
  -r,--repository ARG      Template repository
  --configuration-file ARG Use specified configuration file
  --initialize-git-repository
                           Initialize with git repository
  --after-command ARG      The command to be run after generation

Templates

Available templates

Please see https://github.com/fujimura/hi/wiki#available-templates and feel free to add yours!

How to make your own template

Template is used for templating.

Available variables:

  • $packageName : name of package, like 'hi'
  • $moduleName : name of module, like 'Hi'
  • $author : name of author, like 'Fujimura Daisuke'
  • $email : email address of maintainer, like '[email protected]'

'package-name' and 'ModuleName' in filepath will be replaced with given variable.

Files under package-name will be used as the source of generated files. Files in root directory will not be copied.

Motivation

I'm tired to organize directory structure for every new Haskell project which has some test. This library is heavily inspired by grunt-init.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

More Repositories

1

git-gsub

A Git subcommand to do gsub in a repository
Go
72
star
2

houseman

A Haskell implementation of Foreman
Haskell
23
star
3

spot

spot
Haskell
20
star
4

wai-hspec-example

Example for wai + hspec
Haskell
15
star
5

git-freq

A Git subcommand to detect frequently changed code in the repository
Haskell
12
star
6

authentication

Authentication for minimalist
Ruby
10
star
7

token_attribute

Macro to generate unique random token attribute for ActiveRecord
Ruby
10
star
8

dotfiles

~/.
Vim Script
9
star
9

nippou

Ruby
6
star
10

purescript-react-example

PureScript + React.js example, based on https://github.com/purescript-contrib/purescript-react.
PureScript
6
star
11

fb_graph-rails

Ruby
4
star
12

rack-google_login

Minimalist login for rack app with Google account
Ruby
4
star
13

railsdm_2018_postgresql

Rails Developer Meetup 2018 Day 1ใ€Œใใ‚ŒPostgreSQLใงใงใใ‚‹ใ‚ˆใ€ใฎ็™บ่กจ่ณ‡ๆ–™ใจใ‚ณใƒผใƒ‰
TSQL
4
star
14

omniauth-google-oauth2-sample

omniauth-google-oauth2-sample
Ruby
3
star
15

skyptra

sinatra based skype bot
Ruby
3
star
16

rspec-something

Something expects one message in your example
Ruby
3
star
17

facebook-oauth2-example

Facebook OAuth2 Example in Haskell
Haskell
3
star
18

fb_graph-rails-example

example app for FbGraph::Rails
Ruby
3
star
19

hs-git-gsub

A Git subcommand to do gsub in a repository
Haskell
3
star
20

fizzbuzz

fizzbuzz
Haskell
2
star
21

yesod-basic

Haskell
2
star
22

google_chrome_open_hoogle

Open hoogle with context menu, with selected text
JavaScript
2
star
23

functional-stream-processing-meetup-sample

Haskell
2
star
24

speak_your_mind

rspec-like output for Shoulda/Test::Unit.
Ruby
1
star
25

chi

Generate scaffold for a Haskell project
Haskell
1
star
26

fujimura.github.com

fujimura.github.com
HTML
1
star
27

heisei_ruby_kaigi_01_simple_delegator

JavaScript
1
star
28

persistent-hspec-example

Haskell
1
star
29

s3

s3cmd wrapper in Haskell
Haskell
1
star
30

rspec-become-matcher

RSpec matcher to check that an expression changed its result in arbitrary seconds
Ruby
1
star
31

for_a_few_monads_more

Slides
Haskell
1
star
32

mongodb-query-builder

MongoDB Query Builder in Haskell
Haskell
1
star
33

hi-hspec

1
star
34

knob

Forked from https://hackage.haskell.org/package/knob
Haskell
1
star
35

mini_login

mini login
Ruby
1
star
36

philip

Write .cabal file in Haskell
Haskell
1
star
37

hi-example

Haskell
1
star
38

ghostwriter

Template engine server
JavaScript
1
star
39

hi-flat

1
star
40

chi-cli

Haskell
1
star