Skip to content

Update build #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/.*
!/.gitignore
!/.jscsrc
!/.jshintrc
!/.travis.yml
/bower_components/
/node_modules/
/output/
/.psci*
/src/.webpack.js
.pulp-cache/
17 changes: 17 additions & 0 deletions .jscsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"preset": "grunt",
"disallowSpacesInFunctionExpression": null,
"requireSpacesInFunctionExpression": {
"beforeOpeningRoundBrace": true,
"beforeOpeningCurlyBrace": true
},
"disallowSpacesInAnonymousFunctionExpression": null,
"requireSpacesInAnonymousFunctionExpression": {
"beforeOpeningRoundBrace": true,
"beforeOpeningCurlyBrace": true
},
"disallowSpacesInsideObjectBrackets": null,
"requireSpacesInsideObjectBrackets": "all",
"validateQuoteMarks": "\"",
"requireCurlyBraces": null
}
7 changes: 3 additions & 4 deletions .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@
"freeze": true,
"funcscope": true,
"futurehostile": true,
"globalstrict": true,
"strict": "global",
"latedef": true,
"maxparams": 1,
"noarg": true,
"nocomma": true,
"nonew": true,
"notypeof": true,
"singleGroups": true,
"undef": true,
"unused": true,
"eqnull": true
"eqnull": true,
"predef": ["exports", "Buffer"]
}

18 changes: 13 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
language: node_js
sudo: false
node_js:
- 4.2
- 5.2
dist: trusty
sudo: required
node_js: 6
env:
- PATH=$HOME/purescript:$PATH
install:
- 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')
- wget -O $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/linux64.tar.gz
- tar -xvf $HOME/purescript.tar.gz -C $HOME/
- chmod a+x $HOME/purescript
- npm install -g bower
- npm install
script:
- npm run build
- bower install --production
- npm run -s build
- bower install
- npm run -s test
after_success:
- >-
test $TRAVIS_TAG &&
echo $GITHUB_TOKEN | pulp login &&
echo y | pulp publish --no-push
15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
{
"private": true,
"scripts": {
"postinstall": "bower install",
"build": "jshint src && pulp build && rimraf docs && pulp docs"
"clean": "rimraf output && rimraf .pulp-cache",
"build": "jshint src && jscs src && pulp build --censor-lib --strict",
"test": "pulp test"
},
"devDependencies": {
"jshint": "^2.8.0",
"pulp": "^9.0.0",
"rimraf": "^2.4.1",
"stream-buffers": "^3.0.0"
"jscs": "^3.0.7",
"jshint": "^2.9.3",
"pulp": "^9.0.1",
"purescript-psa": "^0.3.9",
"rimraf": "^2.5.4",
"stream-buffers": "^3.0.1"
}
}
236 changes: 117 additions & 119 deletions src/Node/Stream.js
Original file line number Diff line number Diff line change
@@ -1,173 +1,171 @@
/* global exports */
/* global Buffer */
"use strict";

exports.undefined = undefined;

exports.setEncodingImpl = function(s) {
return function(enc) {
return function() {
s.setEncoding(enc);
};
exports.setEncodingImpl = function (s) {
return function (enc) {
return function () {
s.setEncoding(enc);
};
};
};

exports.readChunkImpl = function(Left) {
return function(Right) {
return function(chunk) {
if (chunk instanceof Buffer) {
return Right(chunk);
} else if (typeof chunk === 'string') {
return Left(chunk);
} else {
throw new Error(
"Node.Stream.readChunkImpl: Unrecognised " +
"chunk type; expected String or Buffer, got: " +
chunk);
}
};
exports.readChunkImpl = function (Left) {
return function (Right) {
return function (chunk) {
if (chunk instanceof Buffer) {
return Right(chunk);
} else if (typeof chunk === "string") {
return Left(chunk);
} else {
throw new Error(
"Node.Stream.readChunkImpl: Unrecognised " +
"chunk type; expected String or Buffer, got: " +
chunk);
}
};
};
};

exports.onDataEitherImpl = function(readChunk) {
return function(r) {
return function(f) {
return function() {
r.on('data', function(data) {
f(readChunk(data))();
});
};
};
exports.onDataEitherImpl = function (readChunk) {
return function (r) {
return function (f) {
return function () {
r.on("data", function (data) {
f(readChunk(data))();
});
};
};
};
};

exports.onEnd = function(s) {
return function(f) {
return function() {
s.on('end', f);
};
exports.onEnd = function (s) {
return function (f) {
return function () {
s.on("end", f);
};
};
};

exports.onReadable = function(s) {
return function(f) {
return function() {
s.on('readable', f);
};
exports.onReadable = function (s) {
return function (f) {
return function () {
s.on("readable", f);
};
};
};

exports.onError = function(s) {
return function(f) {
return function() {
s.on('error', function(e) {
f(e)();
});
};
exports.onError = function (s) {
return function (f) {
return function () {
s.on("error", function (e) {
f(e)();
});
};
};
};

exports.onClose = function(s) {
return function(f) {
return function() {
s.on('close', f);
};
exports.onClose = function (s) {
return function (f) {
return function () {
s.on("close", f);
};
};
};

exports.resume = function(s) {
return function() {
s.resume();
};
exports.resume = function (s) {
return function () {
s.resume();
};
};

exports.pause = function(s) {
return function() {
s.pause();
};
exports.pause = function (s) {
return function () {
s.pause();
};
};

exports.isPaused = function(s) {
return function() {
return s.isPaused();
};
exports.isPaused = function (s) {
return function () {
return s.isPaused();
};
};

exports.pipe = function(r) {
return function(w) {
return function() {
return r.pipe(w);
};
exports.pipe = function (r) {
return function (w) {
return function () {
return r.pipe(w);
};
};
};

exports.readImpl = function(readChunk) {
return function(Nothing) {
return function(Just) {
return function(r) {
return function(s) {
return function() {
var v = r.read(s);
if (v === null) {
return Nothing;
} else {
return Just(readChunk(v));
}
};
};
};
exports.readImpl = function (readChunk) {
return function (Nothing) {
return function (Just) {
return function (r) {
return function (s) {
return function () {
var v = r.read(s);
if (v === null) {
return Nothing;
} else {
return Just(readChunk(v));
}
};
};
};
};
};
};

exports.write = function(w) {
return function(chunk) {
return function(done) {
return function() {
return w.write(chunk, null, done);
};
};
exports.write = function (w) {
return function (chunk) {
return function (done) {
return function () {
return w.write(chunk, null, done);
};
};
};
};

exports.writeStringImpl = function(w) {
return function(enc) {
return function(s) {
return function(done) {
return function() {
return w.write(s, enc, done);
};
};
exports.writeStringImpl = function (w) {
return function (enc) {
return function (s) {
return function (done) {
return function () {
return w.write(s, enc, done);
};
};
};
};
};

exports.cork = function(w) {
return function() {
return w.cork();
};
exports.cork = function (w) {
return function () {
return w.cork();
};
};

exports.uncork = function(w) {
return function() {
return w.uncork();
};
exports.uncork = function (w) {
return function () {
return w.uncork();
};
};

exports.setDefaultEncodingImpl = function(w) {
return function(enc) {
return function() {
w.setDefaultEncoding(enc);
};
exports.setDefaultEncodingImpl = function (w) {
return function (enc) {
return function () {
w.setDefaultEncoding(enc);
};
};
};

exports.end = function(w) {
return function(done) {
return function() {
w.end(null, null, function() {
done();
});
};
exports.end = function (w) {
return function (done) {
return function () {
w.end(null, null, function () {
done();
});
};
};
};