-
Notifications
You must be signed in to change notification settings - Fork 1
/
shaker.cabal
163 lines (157 loc) · 6.27 KB
/
shaker.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
name: shaker
version: 0.5.1
cabal-version: >= 1.8
build-type: Custom
license: BSD3
license-file: LICENSE
copyright: Copyright (c) 2010 Anthonin Bonnefoy
author: Anthonin Bonnefoy
maintainer: anthonin.bonnefoy@gmail.com
homepage: http://github.com/bonnefoa/Shaker
bug-reports: http://github.com/bonnefoa/Shaker/issues
Stability:alpha
Tested-With:GHC >= 7
category: Development
synopsis: simple and interactive command-line build tool
description:
Shaker is a build tool which allow to simply compile or launch test on an haskell project and provides some interesting features like continuous action. With continuous action, an action (compile or test) will be automatically executed when a source modification is detected.
.
All configuration are made via cabal; Shaker will read cabal configuration to discover source directories, compilation options and targets to compile.
.
/Usage/
.
The cabal configuration file should be generated beforehand with /cabal configure/. If you change your cabal configuration, you will need to recreate the configuration file.
.
/Launch interactive prompt/
.
In the root of your haskell project, launch shaker. An interactive prompt will allow you to execute different actions.
.
/Launch a shaker action from command-line/
.
In the root of your haskell project, launch shaker with your action as a command argument; shaker will execute the given action and exit. See examples for more details.
.
/Action execution/
.
[@Simple Execution@] An action can be launched normally, by entering the action name.
.
[@Multiple action execution@] You can specify multiple action to execute simply by separating action by spaces.
.
[@Continuous Action@] A continuous action will execute the action when a file modification has been detected.
Every action are elligible to continuous action, you simply need to prefix them with '~'. To stop a continuous action, simply use ^C.
.
/Available actions/
.
[@compile@] Compile the project. Targets of the compilation are main files (in case of executable) and exposed modules (in case of library).
.
[@fullcompile@] Compile all hs files found in source directory. It is usefull to compile sources not declared in cabal. Since it is not possible to compile multiple modules with main, all modules with a main function are excluded.
.
[@help@] Print all available action.
.
[@clean@] Clean the directory containing .o and .hi files.
.
[@test@] Launch all quickcheck properties and hunit tests of the project using test-framework. You can provide one or several regexps as argument and shaker will execute all tests matching one regexp. Quickcheck properties and HUnit tests are automatically discovered using GHC Api. All functions begining with “prop_” are considered as quickcheck properties and all functions of type Test.HUnit.Lang.Assertion and TestCase are considered as HUnit tests.
.
[@test-module@] Same as test but test-module takes one or several module patterns as arguments.
.
[@quit@] Exit the application. You can also use ^C or ^D to exit shaker.
.
/Examples with interactive prompt/
.
[@% compile@] Simply compile the project
.
[@% clean compile@] Clean and compile the project
.
[@% ~compile@] Switch to continuous mode and will compile the project when sources are modified.
.
[@% ~clean compile@] Switch to continuous mode and will clean and compile the project when sources are modified.
.
[@% test@] Execute all tests in the project
.
[@% test prop_.*@] Execute all quickcheck properties of the project.
.
[@% test testExecute.* testFilter.* @] Execute all tests matching testExecute.* or testFilter.*
.
[@% test-module Regex Refle@] Launch all tests in modules matching Regex.* or Refle.*
.
/Examples with command-line/
.
[@% shaker fullcompile@] Launch shaker, execute the fullcompile action and give back the control.
.
[@% shaker \"~fullcompile\" @] Launch shaker, continuously execute the fullcompile action until shaker is interrupted.
.
extra-source-files: README TODO
source-repository head
type: git
location: git://github.com/bonnefoa/Shaker.git
source-repository this
type: git
location: git://github.com/bonnefoa/Shaker.git
tag: 0.5.1
Library
ghc-options: -Wall -fno-warn-orphans
hs-source-dirs: src testsuite/tests
exposed-modules:
Shaker.Action.Compile
Shaker.Action.Standard
Shaker.Action.Test
Shaker.CabalInfo
Shaker.CabalInterface
Shaker.Cli
Shaker.CommonUtil
Shaker.Conductor
Shaker.Config
Shaker.GhcInterface
Shaker.HsHelper
Shaker.Io
Shaker.Listener
Shaker.ModuleData
Shaker.Parser
Shaker.PluginConfig
Shaker.Reflexivite
Shaker.Regex
Shaker.TestTH
Shaker.Type
build-depends: base == 4.*
,bytestring == 0.9.*
,Cabal == 1.10.*
,containers == 0.4.*
,directory == 1.*
,filepath == 1.*
,ghc == 7.*
,ghc-paths == 0.1.*
,haskeline == 0.6.*
,haskell-src == 1.0.*
,HUnit == 1.2.*
,mtl == 2.*
,old-time >= 1.0.0
,parsec3 == 1.*
,QuickCheck == 2.4.*
,regex-posix == 0.95.*
,template-haskell >= 2.5.0.0
,test-framework == 0.4.*
,test-framework-hunit == 0.2.*
,test-framework-quickcheck2 == 0.2.*
Executable shaker
Main-Is: Shaker.hs
ghc-options: -Wall -fno-warn-orphans
hs-source-dirs: prog src
build-depends: base == 4.*
,bytestring == 0.9.*
,Cabal == 1.10.*
,containers == 0.4.*
,directory == 1.*
,filepath == 1.*
,ghc == 7.*
,ghc-paths == 0.1.*
,haskeline == 0.6.*
,haskell-src
,HUnit == 1.2.*
,mtl == 2.*
,old-time >= 1.0.0
,parsec3 == 1.*
,QuickCheck == 2.4.*
,regex-posix == 0.95.*
,template-haskell >= 2.5.0.0
,test-framework == 0.4.*
,test-framework-hunit == 0.2.*
,test-framework-quickcheck2 == 0.2.*