Skip to content

Commit 7739b1a

Browse files
authored
Configure GitHub Actions (#1)
1 parent 146a7ba commit 7739b1a

File tree

10 files changed

+114
-10
lines changed

10 files changed

+114
-10
lines changed

.eslintrc.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"parserOptions": {
3+
"ecmaVersion": 5
4+
},
5+
"extends": "eslint:recommended",
6+
"env": {
7+
"commonjs": true,
8+
"browser": true
9+
},
10+
"globals": {
11+
"QueuingStrategy": "readonly"
12+
},
13+
"rules": {
14+
"strict": [2, "global"],
15+
"block-scoped-var": 2,
16+
"consistent-return": 2,
17+
"eqeqeq": [2, "smart"],
18+
"guard-for-in": 2,
19+
"no-caller": 2,
20+
"no-extend-native": 2,
21+
"no-loop-func": 2,
22+
"no-new": 2,
23+
"no-param-reassign": 2,
24+
"no-return-assign": 2,
25+
"no-unused-expressions": 2,
26+
"no-use-before-define": 2,
27+
"radix": [2, "always"],
28+
"indent": [2, 2],
29+
"quotes": [2, "double"],
30+
"semi": [2, "always"]
31+
}
32+
}

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- uses: purescript-contrib/setup-purescript@main
16+
17+
- uses: actions/setup-node@v1
18+
with:
19+
node-version: "10"
20+
21+
- name: Install dependencies
22+
run: |
23+
npm install -g bower
24+
npm install
25+
bower install --production
26+
27+
- name: Build source
28+
run: npm run-script build
29+
30+
- name: Run tests
31+
run: |
32+
bower install
33+
npm run-script test --if-present

.gitignore

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
/.*
2+
!/.gitignore
3+
!/.eslintrc.json
4+
!/.github/
5+
package-lock.json
16
/bower_components/
27
/node_modules/
3-
/.pulp-cache/
48
/output/
59
/generated-docs/
6-
/.psc-package/
7-
/.psc*
8-
/.purs*
9-
/.psa*

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
11
# purescript-web-streams
2+
3+
[![Latest release](http://img.shields.io/github/release/purescript-web/purescript-web-streams.svg)](https://github.com/purescript-web/purescript-web-streams/releases)
4+
[![Build status](https://github.com/purescript/purescript-web-streams/workflows/CI/badge.svg?branch=master)](https://github.com/purescript/purescript-web-streams/actions?query=workflow%3ACI+branch%3Amaster)
5+
[![Pursuit](https://pursuit.purescript.org/packages/purescript-web-streams/badge)](https://pursuit.purescript.org/packages/purescript-web-streams)
6+
7+
Type definitions and low level interface implementations for ReadableStream and related types from the [WHATWG Streams Living Standard](https://streams.spec.whatwg.org/).
8+
9+
## Installation
10+
11+
```
12+
spago install web-streams
13+
```
14+
15+
## Documentation
16+
17+
Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-web-streams).

package.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"private": true,
3+
"scripts": {
4+
"clean": "rimraf output && rimraf .pulp-cache",
5+
"build": "eslint src && pulp build -- --censor-lib --strict"
6+
},
7+
"devDependencies": {
8+
"eslint": "^7.15.0",
9+
"pulp": "^15.0.0",
10+
"purescript-psa": "^0.8.0",
11+
"rimraf": "^3.0.2"
12+
}
13+
}

src/Web/Streams/QueuingStrategy.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use strict";
2+
13
exports.new = function(options) {
24
return function() {
35
return new QueuingStrategy(options);
@@ -14,4 +16,4 @@ exports.countQueuingStrategy = function(options) {
1416
return function() {
1517
return new CountQueuingStrategy(options);
1618
};
17-
};
19+
};

src/Web/Streams/ReadableStream.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use strict";
2+
13
exports._new = function(source, strategy) {
24
return new ReadableStream(source, strategy);
35
};
@@ -23,4 +25,4 @@ exports.getReader = function(stream) {
2325
exports._tee = function(tuple, stream) {
2426
var r = stream.tee();
2527
return tuple(r[0])(r[1]);
26-
};
28+
};

src/Web/Streams/ReadableStreamController.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use strict";
2+
13
exports.enqueue = function(chunk) {
24
return function(controller) {
35
return function() {
@@ -24,4 +26,4 @@ exports.desiredSize = function(controller) {
2426
return function() {
2527
return controller.desiredSize;
2628
};
27-
};
29+
};

src/Web/Streams/Reader.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
"use strict";
2+
13
exports._read = function(nothing, just, reader) {
24
return reader.read().then(function(res) {
35
if (res.done) {
46
return nothing;
57
}
68
return just(res.value);
79
});
8-
};
10+
};

src/Web/Streams/Source.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use strict";
2+
13
exports._make = function(options) {
24
var newOptions = {
35
start: function(controller) {
@@ -15,4 +17,4 @@ exports._make = function(options) {
1517
};
1618
}
1719
return newOptions;
18-
};
20+
};

0 commit comments

Comments
 (0)