Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Commit 997954c

Browse files
committed
Updates for 0.7
1 parent aa1b0d0 commit 997954c

File tree

5 files changed

+115
-163
lines changed

5 files changed

+115
-163
lines changed

MODULE.md

Lines changed: 54 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -156,17 +156,24 @@ instance isForeignPsc :: IsForeign Psc
156156
```
157157

158158

159-
#### `isForeignPscMake`
159+
#### `isForeignPscDocs`
160160

161161
``` purescript
162-
instance isForeignPscMake :: IsForeign PscMake
162+
instance isForeignPscDocs :: IsForeign PscDocs
163163
```
164164

165165

166-
#### `isForeignPscDocs`
166+
#### `isForeignPathArray`
167167

168168
``` purescript
169-
instance isForeignPscDocs :: IsForeign PscDocs
169+
instance isForeignPathArray :: IsForeign PathArray
170+
```
171+
172+
173+
#### `isForeignDocgen`
174+
175+
``` purescript
176+
instance isForeignDocgen :: IsForeign Docgen
170177
```
171178

172179

@@ -177,31 +184,66 @@ instance isForeignFormat :: IsForeign Format
177184
```
178185

179186

180-
#### `pscOptions`
187+
#### `commandLineOptionBoolean`
181188

182189
``` purescript
183-
pscOptions :: Foreign -> [String]
190+
instance commandLineOptionBoolean :: CommandLineOption Boolean
184191
```
185192

186193

187-
#### `pscOptionsNoOutput`
194+
#### `commandLineOptionString`
188195

189196
``` purescript
190-
pscOptionsNoOutput :: Foreign -> Tuple (Maybe String) [String]
197+
instance commandLineOptionString :: CommandLineOption String
191198
```
192199

193200

194-
#### `pscMakeOptions`
201+
#### `commandLineOptionEither`
195202

196203
``` purescript
197-
pscMakeOptions :: Foreign -> [String]
204+
instance commandLineOptionEither :: (CommandLineOption a, CommandLineOption b) => CommandLineOption (Either a b)
205+
```
206+
207+
208+
#### `commandLineOptionArray`
209+
210+
``` purescript
211+
instance commandLineOptionArray :: (CommandLineOption a) => CommandLineOption [a]
212+
```
213+
214+
215+
#### `commandLineOptionPathArray`
216+
217+
``` purescript
218+
instance commandLineOptionPathArray :: CommandLineOption PathArray
219+
```
220+
221+
222+
#### `commandLineOptionDocgen`
223+
224+
``` purescript
225+
instance commandLineOptionDocgen :: CommandLineOption Docgen
226+
```
227+
228+
229+
#### `commandLineOptionFormat`
230+
231+
``` purescript
232+
instance commandLineOptionFormat :: CommandLineOption Format
233+
```
234+
235+
236+
#### `pscOptions`
237+
238+
``` purescript
239+
pscOptions :: Foreign -> Either ForeignError [String]
198240
```
199241

200242

201243
#### `pscDocsOptions`
202244

203245
``` purescript
204-
pscDocsOptions :: Foreign -> [String]
246+
pscDocsOptions :: Foreign -> Either ForeignError [String]
205247
```
206248

207249

@@ -308,14 +350,7 @@ type Effects eff = (which :: Which, through2 :: Through2, resolveBin :: ResolveB
308350
#### `psc`
309351

310352
``` purescript
311-
psc :: forall eff. Foreign -> Eff (Effects eff) (Stream File File)
312-
```
313-
314-
315-
#### `pscMake`
316-
317-
``` purescript
318-
pscMake :: forall eff. Foreign -> Eff (Effects eff) (Stream File Unit)
353+
psc :: forall eff. Foreign -> (Error -> Eff (Effects eff) Unit) -> (Unit -> Eff (Effects eff) Unit) -> Eff (Effects eff) Unit
319354
```
320355

321356

entry.js

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
'use strict';
22

33
var gulpPurescript = require('GulpPurescript.Plugin');
4+
var Promise = require('promise');
45

56
function psc(options) {
6-
var result = gulpPurescript.psc(options);
7-
return result();
8-
}
9-
10-
function pscMake(options) {
11-
var result = gulpPurescript.pscMake(options);
12-
return result();
7+
return new Promise(function (resolve, reject) {
8+
var errback = function (err) {
9+
return function () {
10+
reject(err);
11+
};
12+
};
13+
var callback = function (x) {
14+
return function () {
15+
resolve(x);
16+
};
17+
};
18+
gulpPurescript.psc(options)(errback)(callback)();
19+
});
1320
}
1421

1522
function pscDocs(options) {
@@ -24,8 +31,6 @@ function dotPsci() {
2431

2532
module.exports.psc = psc;
2633

27-
module.exports.pscMake = pscMake;
28-
2934
module.exports.pscDocs = pscDocs;
3035

3136
module.exports.dotPsci = dotPsci;

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "gulp-purescript",
33
"description": "Run the PureScript compiler",
4-
"version": "0.5.0-rc.1",
4+
"version": "0.5.0-rc.2",
55
"license": "MIT",
66
"repository": "purescript-contrib/gulp-purescript",
77
"author": {
@@ -35,6 +35,7 @@
3535
"logalot": "^2.1.0",
3636
"minimist": "^1.1.1",
3737
"multipipe": "^0.1.2",
38+
"promise": "^7.0.3",
3839
"resolve-bin": "^0.3.0",
3940
"through2": "^0.6.3",
4041
"which": "^1.0.9"

0 commit comments

Comments
 (0)