From 6e74608a644d31adf75b6d268ee81c4122fca9aa Mon Sep 17 00:00:00 2001 From: Gary Burgess Date: Sun, 17 Jan 2016 17:06:16 +0000 Subject: [PATCH] Updates to build, etc --- .jscsrc | 5 ++ .jshintrc | 5 +- .travis.yml | 16 +++- README.md | 4 +- bower.json | 4 - docs/Math.md | 228 --------------------------------------------------- package.json | 12 +-- src/Math.js | 1 - 8 files changed, 29 insertions(+), 246 deletions(-) delete mode 100644 docs/Math.md diff --git a/.jscsrc b/.jscsrc index 342da66..2561ce9 100644 --- a/.jscsrc +++ b/.jscsrc @@ -1,5 +1,10 @@ { "preset": "grunt", + "disallowSpacesInFunctionExpression": null, + "requireSpacesInFunctionExpression": { + "beforeOpeningRoundBrace": true, + "beforeOpeningCurlyBrace": true + }, "disallowSpacesInAnonymousFunctionExpression": null, "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, diff --git a/.jshintrc b/.jshintrc index f391159..620d8d7 100644 --- a/.jshintrc +++ b/.jshintrc @@ -5,7 +5,7 @@ "freeze": true, "funcscope": true, "futurehostile": true, - "globalstrict": true, + "strict": "global", "latedef": true, "maxparams": 1, "noarg": true, @@ -15,5 +15,6 @@ "singleGroups": true, "undef": true, "unused": true, - "eqnull": true + "eqnull": true, + "predef": ["exports"] } diff --git a/.travis.yml b/.travis.yml index 791313a..36183ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: node_js -sudo: false -node_js: - - 0.10 +sudo: required +dist: trusty +node_js: 5 env: - PATH=$HOME/purescript:$PATH install: @@ -9,6 +9,16 @@ install: - 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 + - bower install script: - npm run build +after_success: +- >- + test $TRAVIS_TAG && + psc-publish > .pursuit.json && + curl -X POST http://pursuit.purescript.org/packages \ + -d @.pursuit.json \ + -H 'Accept: application/json' \ + -H "Authorization: token ${GITHUB_TOKEN}" diff --git a/README.md b/README.md index 80b5480..608114d 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,6 @@ Standard math functions from JavaScript. bower install purescript-math ``` -## Module documentation +## Documentation -- [Math](docs/Math.md) +Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-math). diff --git a/bower.json b/bower.json index 6dca260..d6714df 100644 --- a/bower.json +++ b/bower.json @@ -2,9 +2,6 @@ "name": "purescript-math", "homepage": "https://github.com/purescript/purescript-math", "description": "Math functions", - "keywords": [ - "purescript" - ], "license": "MIT", "repository": { "type": "git", @@ -17,7 +14,6 @@ "output", "test", "bower.json", - "gulpfile.js", "package.json" ] } diff --git a/docs/Math.md b/docs/Math.md deleted file mode 100644 index 0eae30d..0000000 --- a/docs/Math.md +++ /dev/null @@ -1,228 +0,0 @@ -## Module Math - -Wraps the math functions and constants from Javascript's built-in `Math` object. -See [Math Reference at MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math). - -#### `Radians` - -``` purescript -type Radians = Number -``` - -An alias to make types in this module more explicit. - -#### `abs` - -``` purescript -abs :: Number -> Number -``` - -Returns the absolute value of the argument. - -#### `acos` - -``` purescript -acos :: Number -> Radians -``` - -Returns the inverse cosine of the argument. - -#### `asin` - -``` purescript -asin :: Number -> Radians -``` - -Returns the inverse sine of the argument. - -#### `atan` - -``` purescript -atan :: Number -> Radians -``` - -Returns the inverse tangent of the argument. - -#### `atan2` - -``` purescript -atan2 :: Number -> Number -> Radians -``` - -Four-quadrant tangent inverse. Given the arguments `y` and `x`, returns -the inverse tangent of `y / x`, where the signs of both arguments are used -to determine the sign of the result. -If the first argument is negative, the result will be negative. -The result is the angle between the positive x axis and a point `(x, y)`. - -#### `ceil` - -``` purescript -ceil :: Number -> Number -``` - -Returns the smallest integer not smaller than the argument. - -#### `cos` - -``` purescript -cos :: Radians -> Number -``` - -Returns the cosine of the argument. - -#### `exp` - -``` purescript -exp :: Number -> Number -``` - -Returns `e` exponentiated to the power of the argument. - -#### `floor` - -``` purescript -floor :: Number -> Number -``` - -Returns the largest integer not larger than the argument. - -#### `log` - -``` purescript -log :: Number -> Number -``` - -Returns the natural logarithm of a number. - -#### `max` - -``` purescript -max :: Number -> Number -> Number -``` - -Returns the largest of two numbers. - -#### `min` - -``` purescript -min :: Number -> Number -> Number -``` - -Returns the smallest of two numbers. - -#### `pow` - -``` purescript -pow :: Number -> Number -> Number -``` - -Return the first argument exponentiated to the power of the second argument. - -#### `round` - -``` purescript -round :: Number -> Number -``` - -Returns the integer closest to the argument. - -#### `sin` - -``` purescript -sin :: Radians -> Number -``` - -Returns the sine of the argument. - -#### `sqrt` - -``` purescript -sqrt :: Number -> Number -``` - -Returns the square root of the argument. - -#### `tan` - -``` purescript -tan :: Radians -> Number -``` - -Returns the tangent of the argument. - -#### `(%)` - -``` purescript -(%) :: Number -> Number -> Number -``` - -_left-associative / precedence 7_ - -Computes the remainder after division, wrapping Javascript's `%` operator. - -#### `e` - -``` purescript -e :: Number -``` - -The base of natural logarithms, *e*, around 2.71828. - -#### `ln2` - -``` purescript -ln2 :: Number -``` - -The natural logarithm of 2, around 0.6931. - -#### `ln10` - -``` purescript -ln10 :: Number -``` - -The natural logarithm of 10, around 2.3025. - -#### `log2e` - -``` purescript -log2e :: Number -``` - -The base 2 logarithm of `e`, around 1.4426. - -#### `log10e` - -``` purescript -log10e :: Number -``` - -Base 10 logarithm of `e`, around 0.43429. - -#### `pi` - -``` purescript -pi :: Number -``` - -The ratio of the circumference of a circle to its diameter, around 3.14159. - -#### `sqrt1_2` - -``` purescript -sqrt1_2 :: Number -``` - -The Square root of one half, around 0.707107. - -#### `sqrt2` - -``` purescript -sqrt2 :: Number -``` - -The square root of two, around 1.41421. - - diff --git a/package.json b/package.json index e129c49..af45679 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,13 @@ { "private": true, "scripts": { - "postinstall": "pulp dep install", - "build": "jshint src && jscs src && pulp build && rimraf docs && pulp docs" + "clean": "rimraf output && rimraf .pulp-cache", + "build": "jshint src && jscs src && pulp build" }, "devDependencies": { - "jscs": "^1.13.1", - "jshint": "^2.8.0", - "pulp": "^4.0.2", - "rimraf": "^2.4.1" + "jscs": "^2.8.0", + "jshint": "^2.9.1", + "pulp": "^8.1.0", + "rimraf": "^2.5.0" } } diff --git a/src/Math.js b/src/Math.js index 3711c8f..8aad982 100644 --- a/src/Math.js +++ b/src/Math.js @@ -1,4 +1,3 @@ -/* global exports */ "use strict"; // module Math