diff --git a/.gitignore b/.gitignore index 030f151..307f9c0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ +/.* +!/.gitignore +!/.travis.yml /bower_components/ /node_modules/ /output/ -/.psci* -/src/.webpack.js diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..64825f3 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,10 @@ +language: node_js +dist: trusty +sudo: required +node_js: 6 +install: + - npm install -g bower + - npm install + - bower install +script: + - npm run -s build diff --git a/README.md b/README.md index 9022c98..e0dad8d 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,16 @@ # purescript-node-url -A wrapper for Node's URL and QueryString APIs +[![Latest release](http://img.shields.io/bower/v/purescript-node-url.svg)](https://github.com/purescript-node/purescript-node-url/releases) +[![Build Status](https://travis-ci.org/purescript-node/purescript-node-url.svg?branch=master)](https://travis-ci.org/purescript-node/purescript-node-url) -- [Module Documentation](docs/) +A wrapper for Node's `URL` and `QueryString` APIs -## Usage +## Installation - bower i purescript-node-url +``` +bower install purescript-node-url +``` + +## Documentation + +Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-node-url). diff --git a/docs/Node/URL.md b/docs/Node/URL.md deleted file mode 100644 index b775a1a..0000000 --- a/docs/Node/URL.md +++ /dev/null @@ -1,67 +0,0 @@ -## Module Node.URL - -This module defines bindings to the Node URL and Query String APIs. - -#### `Query` - -``` purescript -data Query -``` - -A query object is a JavaScript object whose values are strings or arrays of strings. - -It is intended that the user coerce values of this type to/from some trusted representation via -e.g. `Data.Foreign` or `Unsafe.Coerce`.. - -#### `URL` - -``` purescript -type URL = { protocol :: Nullable String, slashes :: Nullable Boolean, host :: Nullable String, auth :: Nullable String, hostname :: Nullable String, port :: Nullable String, pathname :: Nullable String, search :: Nullable String, path :: Nullable String, query :: Nullable String, hash :: Nullable String } -``` - -A URL object. - -All fields are nullable, and will be missing if the URL string passed to -`parse` did not contain the appropriate URL part. - -#### `parse` - -``` purescript -parse :: String -> URL -``` - -Parse a URL string into a URL object. - -#### `format` - -``` purescript -format :: URL -> String -``` - -Format a URL object as a URL string. - -#### `resolve` - -``` purescript -resolve :: String -> String -> String -``` - -Resolve a URL relative to some base URL. - -#### `parseQueryString` - -``` purescript -parseQueryString :: String -> Query -``` - -Convert a query string to an object. - -#### `toQueryString` - -``` purescript -toQueryString :: Query -> String -``` - -Convert a query string to an object. - - diff --git a/package.json b/package.json new file mode 100644 index 0000000..8212e00 --- /dev/null +++ b/package.json @@ -0,0 +1,13 @@ +{ + "private": true, + "scripts": { + "clean": "rimraf output && rimraf .pulp-cache", + "build": "pulp build --censor-lib --strict" + }, + "devDependencies": { + "pulp": "^9.0.0", + "purescript-psa": "^0.3.9", + "purescript": "^0.9.1", + "rimraf": "^2.5.0" + } +}