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 5f7979e..cbc1c5f 100644 --- a/.jshintrc +++ b/.jshintrc @@ -5,9 +5,8 @@ "freeze": true, "funcscope": true, "futurehostile": true, - "globalstrict": true, + "strict": "global", "latedef": true, - "maxparams": 1, "noarg": true, "nocomma": true, "nonew": true, diff --git a/.travis.yml b/.travis.yml index 1d0ea07..a79fb8b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,7 @@ language: node_js -sudo: false -node_js: - - 4 - - 6 +dist: trusty +sudo: required +node_js: 6 env: - PATH=$HOME/purescript:$PATH install: @@ -13,4 +12,12 @@ install: - npm install -g bower - npm install script: - - npm run build + - bower install --production + - npm run -s build + - bower install + - npm test +after_success: +- >- + test $TRAVIS_TAG && + echo $GITHUB_TOKEN | pulp login && + echo y | pulp publish --no-push diff --git a/README.md b/README.md index 36d5eca..79a471f 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Latest release](http://img.shields.io/bower/v/purescript-node-path.svg)](https://github.com/purescript-node/purescript-node-path/releases) [![Build Status](https://travis-ci.org/purescript-node/purescript-node-path.svg?branch=master)](https://travis-ci.org/purescript-node/purescript-node-path) +[![Dependency Status](https://www.versioneye.com/user/projects/5759d0757757a0004a1de996/badge.svg?style=flat)](https://www.versioneye.com/user/projects/5759d0757757a0004a1de996) [![Maintainer: garyb](https://img.shields.io/badge/maintainer-garyb-lightgrey.svg)](http://github.com/garyb) Type type definitions for Node's path module. @@ -12,6 +13,6 @@ Type type definitions for Node's path module. bower install purescript-node-path ``` -## Module documentation +## Documentation -- [Node.Path](docs/Node/Path.md) +Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-node-path). diff --git a/docs/Node/Path.md b/docs/Node/Path.md deleted file mode 100644 index 7b3da28..0000000 --- a/docs/Node/Path.md +++ /dev/null @@ -1,112 +0,0 @@ -## Module Node.Path - -#### `FilePath` - -``` purescript -type FilePath = String -``` - -Type for strings representing file paths. - -#### `normalize` - -``` purescript -normalize :: FilePath -> FilePath -``` - -Normalize a string path, taking care of `..` and `.`, duplicated slashes, -etc. If the path contains a trailing slash it is preserved. On Windows -backslashes are used. - -#### `concat` - -``` purescript -concat :: Array FilePath -> FilePath -``` - -Concatenates multiple path segments together and normalizes the resulting path. - -#### `resolve` - -``` purescript -resolve :: Array FilePath -> FilePath -> FilePath -``` - -Resolves `to` to an absolute path ([from...], to). - -#### `relative` - -``` purescript -relative :: FilePath -> FilePath -> FilePath -``` - -Solve the relative path from `from` to `to`. - -#### `dirname` - -``` purescript -dirname :: FilePath -> FilePath -``` - -Return the directory name of a path. - -#### `basename` - -``` purescript -basename :: FilePath -> FilePath -``` - -Return the last portion of a path. - -#### `basenameWithoutExt` - -``` purescript -basenameWithoutExt :: FilePath -> FilePath -> FilePath -``` - -Return the last portion of a path, also dropping a specific file extension -if it matches the end of the name. - -#### `extname` - -``` purescript -extname :: FilePath -> FilePath -``` - -Return the extension of the path, from the last `.` to end of string in the -last portion of the path. If there is no `.` in the last portion of the -path or the first character of it is `.`, then it returns an empty string. - -#### `sep` - -``` purescript -sep :: String -``` - -The platform-specific file separator. `\\` or `/`. - -#### `delimiter` - -``` purescript -delimiter :: String -``` - -The platform-specific path delimiter, `;` or `:`. - -#### `parse` - -``` purescript -parse :: String -> { root :: String, dir :: String, base :: String, ext :: String, name :: String } -``` - -Parse a path into components. - -#### `isAbsolute` - -``` purescript -isAbsolute :: String -> Boolean -``` - -Determines whether path is an absolute path - - diff --git a/package.json b/package.json index 9e7c824..44534d6 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,15 @@ { "private": true, + "scripts": { + "clean": "rimraf output && rimraf .pulp-cache", + "build": "jshint src && jscs src && pulp build --censor-lib --strict", + "test": "pulp test" + }, "devDependencies": { + "jscs": "^2.8.0", + "jshint": "^2.9.1", "pulp": "^9.0.0", - "jscs": "^1.13.1", - "jshint": "^2.8.0", - "rimraf": "^2.3.3" - }, - "scripts": { - "build": "jshint src && jscs src && pulp build && rimraf docs && pulp docs", - "postinstall": "bower install" + "purescript-psa": "^0.3.8", + "rimraf": "^2.5.0" } }