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

Commit 05f302b

Browse files
committed
Update build and documentation/readme details
1 parent 1c6ff39 commit 05f302b

File tree

9 files changed

+188
-114
lines changed

9 files changed

+188
-114
lines changed

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/.*
22
!/.gitignore
3-
bower_components/
4-
node_modules/
5-
output/
6-
tmp/
3+
!/.travis.yml
4+
/bower_components/
5+
/node_modules/
6+
/output/

.travis.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
language: node_js
2+
sudo: false
3+
node_js:
4+
- 0.10
5+
env:
6+
- PATH=$HOME/purescript:$PATH
7+
install:
8+
- TAG=$(wget -q -O - https://github.com/purescript/purescript/releases/latest --server-response --max-redirect 0 2>&1 | sed -n -e 's/.*Location:.*tag\///p')
9+
- wget -O $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/linux64.tar.gz
10+
- tar -xvf $HOME/purescript.tar.gz -C $HOME/
11+
- chmod a+x $HOME/purescript
12+
- npm install bower gulp -g
13+
- npm install && bower install
14+
script:
15+
- gulp

README.md

Lines changed: 10 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,18 @@
1-
# Module Documentation
1+
# purescript-dom
22

3-
## Module DOM
3+
[![Build Status](https://travis-ci.org/purescript-contrib/purescript-dom.svg?branch=master)](https://travis-ci.org/purescript-contrib/purescript-dom)
4+
[![Maintainer: garyb](https://img.shields.io/badge/maintainer-garyb-lightgrey.svg)](http://github.com/garyb)
45

5-
#### `DOM`
6+
Type definitions and standard effect for interacting with the DOM.
67

7-
``` purescript
8-
data DOM :: !
9-
```
10-
11-
Effect type for DOM maniupulation
12-
13-
#### `Node`
14-
15-
``` purescript
16-
data Node :: *
17-
```
18-
19-
General type for DOM nodes.
20-
21-
#### `NodeList`
22-
23-
``` purescript
24-
data NodeList :: *
25-
```
26-
27-
General type for DOM node lists.
28-
29-
30-
## Module DOM.File
31-
32-
33-
Types for the [W3C File API](http://dev.w3.org/2006/webapi/FileAPI/).
34-
35-
#### `File`
36-
37-
``` purescript
38-
data File :: *
39-
```
40-
41-
A `File` object instance.
42-
43-
#### `FileList`
44-
45-
``` purescript
46-
data FileList :: *
47-
```
48-
49-
A `FileList` object instance.
8+
## Installation
509

51-
#### `FileReader`
52-
53-
``` purescript
54-
data FileReader :: *
55-
```
56-
57-
A `FileReader` object instance.
58-
59-
#### `Blob`
60-
61-
``` purescript
62-
data Blob :: *
63-
```
64-
65-
A `Blob` object instance.
66-
67-
68-
## Module DOM.XHR
69-
70-
71-
Types for the [WHATWG XMLHttpRequest Living Standard](https://xhr.spec.whatwg.org/#interface-formdata).
72-
73-
#### `XMLHttpRequest`
74-
75-
``` purescript
76-
data XMLHttpRequest :: *
7710
```
78-
79-
An `XMLHttpRequest` object instance.
80-
81-
#### `FormData`
82-
83-
``` purescript
84-
data FormData :: *
11+
bower install purescript-dom
8512
```
8613

87-
A `FormData` object instance.
88-
89-
#### `ProgressEvent`
90-
91-
``` purescript
92-
data ProgressEvent :: *
93-
```
94-
95-
A `ProgressEvent` object instance.
96-
97-
14+
## Module documentation
9815

16+
- [DOM](docs/DOM.md)
17+
- [DOM.File](docs/DOM.File.md)
18+
- [DOM.XHR](docs/DOM.XHR.md)

bower.json

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
{
22
"name": "purescript-dom",
3-
"description": "PureScript interface for the DOM.",
4-
"license": "MIT"
3+
"homepage": "https://github.com/purescript-contrib/purescript-dom",
4+
"description": "PureScript type definitions and effect for interacting with the DOM",
5+
"keywords": [
6+
"purescript"
7+
],
8+
"license": "MIT",
9+
"repository": {
10+
"type": "git",
11+
"url": "git://github.com/purescript-contrib/purescript-dom.git"
12+
},
13+
"ignore": [
14+
"**/.*",
15+
"bower_components",
16+
"node_modules",
17+
"output",
18+
"bower.json",
19+
"gulpfile.js",
20+
"package.json"
21+
]
522
}

docs/DOM.File.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
## Module DOM.File
2+
3+
Types for the [W3C File API](http://dev.w3.org/2006/webapi/FileAPI/).
4+
5+
#### `File`
6+
7+
``` purescript
8+
data File :: *
9+
```
10+
11+
A `File` object instance.
12+
13+
#### `FileList`
14+
15+
``` purescript
16+
data FileList :: *
17+
```
18+
19+
A `FileList` object instance.
20+
21+
#### `FileReader`
22+
23+
``` purescript
24+
data FileReader :: *
25+
```
26+
27+
A `FileReader` object instance.
28+
29+
#### `Blob`
30+
31+
``` purescript
32+
data Blob :: *
33+
```
34+
35+
A `Blob` object instance.
36+
37+

docs/DOM.XHR.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
## Module DOM.XHR
2+
3+
Types for the [WHATWG XMLHttpRequest Living Standard](https://xhr.spec.whatwg.org/#interface-formdata).
4+
5+
#### `XMLHttpRequest`
6+
7+
``` purescript
8+
data XMLHttpRequest :: *
9+
```
10+
11+
An `XMLHttpRequest` object instance.
12+
13+
#### `FormData`
14+
15+
``` purescript
16+
data FormData :: *
17+
```
18+
19+
A `FormData` object instance.
20+
21+
#### `ProgressEvent`
22+
23+
``` purescript
24+
data ProgressEvent :: *
25+
```
26+
27+
A `ProgressEvent` object instance.
28+
29+

docs/DOM.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
## Module DOM
2+
3+
#### `DOM`
4+
5+
``` purescript
6+
data DOM :: !
7+
```
8+
9+
Effect type for DOM maniupulation
10+
11+
#### `Document`
12+
13+
``` purescript
14+
data Document :: *
15+
```
16+
17+
General type for DOM documents.
18+
19+
#### `Node`
20+
21+
``` purescript
22+
data Node :: *
23+
```
24+
25+
General type for DOM nodes.
26+
27+
#### `NodeList`
28+
29+
``` purescript
30+
data NodeList :: *
31+
```
32+
33+
General type for DOM node lists.
34+
35+

gulpfile.js

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,49 @@
1+
/* jshint node: true */
12
"use strict";
23

34
var gulp = require("gulp");
4-
var plumber = require("gulp-plumber");
55
var purescript = require("gulp-purescript");
6-
var jsvalidate = require("gulp-jsvalidate");
6+
var rimraf = require("rimraf");
7+
8+
var sources = [
9+
"src/**/*.purs",
10+
"bower_components/purescript-*/src/**/*.purs"
11+
];
12+
13+
var foreigns = [
14+
"src/**/*.js",
15+
"bower_components/purescript-*/src/**/*.js"
16+
];
17+
18+
gulp.task("clean-docs", function (cb) {
19+
rimraf("docs", cb);
20+
});
21+
22+
gulp.task("clean-output", function (cb) {
23+
rimraf("output", cb);
24+
});
25+
26+
gulp.task("clean", ["clean-docs", "clean-output"]);
727

828
gulp.task("make", function() {
9-
return gulp.src(["src/**/*.purs", "bower_components/purescript-*/src/**/*.purs"])
10-
.pipe(plumber())
11-
.pipe(purescript.pscMake());
29+
return gulp.src(sources)
30+
.pipe(purescript.pscMake({ ffi: foreigns }));
1231
});
1332

14-
gulp.task("jsvalidate", ["make"], function () {
15-
return gulp.src("output/**/*.js")
16-
.pipe(plumber())
17-
.pipe(jsvalidate());
33+
gulp.task("docs", ["clean-docs"], function () {
34+
return gulp.src(sources)
35+
.pipe(purescript.pscDocs({
36+
docgen: {
37+
"DOM": "docs/DOM.md",
38+
"DOM.File": "docs/DOM.File.md",
39+
"DOM.XHR": "docs/DOM.XHR.md"
40+
}
41+
}));
1842
});
1943

20-
gulp.task("docs", function () {
21-
return gulp.src("src/**/*.purs")
22-
.pipe(plumber())
23-
.pipe(purescript.pscDocs())
24-
.pipe(gulp.dest("README.md"));
44+
gulp.task("dotpsci", function () {
45+
return gulp.src(sources)
46+
.pipe(purescript.dotPsci());
2547
});
2648

27-
gulp.task("default", ["jsvalidate", "docs"]);
49+
gulp.task("default", ["make", "docs", "dotpsci"]);

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
"private": true,
33
"devDependencies": {
44
"gulp": "^3.8.11",
5-
"gulp-jsvalidate": "^1.0.1",
6-
"gulp-plumber": "^1.0.0",
7-
"gulp-purescript": "^0.1.2"
5+
"gulp-purescript": "^0.5.0-rc.1",
6+
"rimraf": "^2.3.3"
87
}
98
}

0 commit comments

Comments
 (0)