From aee3bf00105d1f1d73d1d9ca5d5e23a7a8afc5e4 Mon Sep 17 00:00:00 2001 From: Gary Burgess Date: Sun, 31 Jul 2016 19:37:36 +0100 Subject: [PATCH] Update dependencies & build --- .gitignore | 6 +- .travis.yml | 21 +++++ README.md | 16 +++- bower.json | 7 +- docs/Node/Globals.md | 47 ----------- docs/Node/Platform.md | 38 --------- docs/Node/Process.md | 184 ------------------------------------------ package.json | 10 +-- 8 files changed, 45 insertions(+), 284 deletions(-) create mode 100644 .travis.yml delete mode 100644 docs/Node/Globals.md delete mode 100644 docs/Node/Platform.md delete mode 100644 docs/Node/Process.md diff --git a/.gitignore b/.gitignore index 4d159c2..307f9c0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ +/.* +!/.gitignore +!/.travis.yml /bower_components/ /node_modules/ -/.pulp-cache/ /output/ -/.psci* -/src/.webpack.js diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..f9843c2 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,21 @@ +language: node_js +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 + - bower install +script: + - npm run -s build +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 cc20f62..149c9cf 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,17 @@ # purescript-node-process -Access the Node.js global `process` object in PurScript. +[![Latest release](http://img.shields.io/bower/v/purescript-node-process.svg)](https://github.com/purescript/purescript-node-process/releases) +[![Build Status](https://travis-ci.org/purescript/purescript-node-process.svg?branch=master)](https://travis-ci.org/purescript/purescript-node-process) +[![Dependency Status](https://www.versioneye.com/user/projects/579e4539aa78d500469f9e72/badge.svg?style=flat)](https://www.versioneye.com/user/projects/579e4539aa78d500469f9e72) -- [Module Documentation](docs/) +The Node.js global `process` object in PureScript. + +## Installation + +``` +bower install purescript-node-process +``` + +## Documentation + +Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-node-process). diff --git a/bower.json b/bower.json index a220bc7..189df87 100644 --- a/bower.json +++ b/bower.json @@ -1,8 +1,5 @@ { "name": "purescript-node-process", - "moduleType": [ - "node" - ], "repository": { "type": "git", "url": "git://github.com/purescript-node/purescript-node-process" @@ -17,9 +14,9 @@ "dependencies": { "purescript-console": "^1.0.0", "purescript-exceptions": "^1.0.0", - "purescript-maps": "^1.0.0", + "purescript-maps": "^1.1.0", "purescript-maybe": "^1.0.0", - "purescript-node-fs": "^1.0.0", + "purescript-node-fs": "^2.0.0", "purescript-node-streams": "^1.0.0", "purescript-posix-types": "^1.0.0", "purescript-unsafe-coerce": "^1.0.0", diff --git a/docs/Node/Globals.md b/docs/Node/Globals.md deleted file mode 100644 index f2ba0cc..0000000 --- a/docs/Node/Globals.md +++ /dev/null @@ -1,47 +0,0 @@ -## Module Node.Globals - -Global objects exposed by Node.js. See also the [Node.js API -documentation](https://nodejs.org/api/globals.html). - -#### `__dirname` - -``` purescript -__dirname :: String -``` - -The name of the directory that the currently executing script resides in. - -Note that this will probably not give you a very useful answer unless you -have bundled up your PureScript code using `psc-bundle`! - -#### `__filename` - -``` purescript -__filename :: String -``` - -The absolute path of the code file being executed. - -Note that this will probably not give you a very useful answer unless you -have bundled up your PureScript code using `psc-bundle`! - -#### `unsafeRequire` - -``` purescript -unsafeRequire :: forall a. String -> a -``` - -Just calls `require`. You might also consider using the FFI instead. This -function is, in general, horribly unsafe, and may perform side effects. - -#### `requireResolve` - -``` purescript -requireResolve :: forall eff. String -> Eff (fs :: FS | eff) String -``` - -`require.resolve()`. Use the internal `require` machinery to look up the -location of a module, but rather than loading the module, just return the -resolved filename. - - diff --git a/docs/Node/Platform.md b/docs/Node/Platform.md deleted file mode 100644 index 7ec90a1..0000000 --- a/docs/Node/Platform.md +++ /dev/null @@ -1,38 +0,0 @@ -## Module Node.Platform - -This module defines data type for the different platforms supported by -Node.js - -#### `Platform` - -``` purescript -data Platform - = Darwin - | FreeBSD - | Linux - | SunOS - | Win32 -``` - -##### Instances -``` purescript -Show Platform -Eq Platform -Ord Platform -``` - -#### `toString` - -``` purescript -toString :: Platform -> String -``` - -The String representation for a platform, recognised by Node.js. - -#### `fromString` - -``` purescript -fromString :: String -> Maybe Platform -``` - - diff --git a/docs/Node/Process.md b/docs/Node/Process.md deleted file mode 100644 index e3aa0d4..0000000 --- a/docs/Node/Process.md +++ /dev/null @@ -1,184 +0,0 @@ -## Module Node.Process - -Bindings to the global `process` object in Node.js. See also [the Node API documentation](https://nodejs.org/api/process.html) - -#### `PROCESS` - -``` purescript -data PROCESS :: ! -``` - -An effect tracking interaction with the global `process` object. - -#### `onBeforeExit` - -``` purescript -onBeforeExit :: forall eff. Eff (process :: PROCESS | eff) Unit -> Eff (process :: PROCESS | eff) Unit -``` - -Register a callback to be performed when the event loop empties, and -Node.js is about to exit. Asynchronous calls can be made in the callback, -and if any are made, it will cause the process to continue a little longer. - -#### `onExit` - -``` purescript -onExit :: forall eff. (Int -> Eff (process :: PROCESS | eff) Unit) -> Eff (process :: PROCESS | eff) Unit -``` - -Register a callback to be performed when the process is about to exit. -Any work scheduled via asynchronous calls made here will not be performed -in time. - -The argument to the callback is the exit code which the process is about -to exit with. - -#### `onSignal` - -``` purescript -onSignal :: forall eff. String -> Eff (process :: PROCESS | eff) Unit -> Eff (process :: PROCESS | eff) Unit -``` - -Install a handler for a particular signal. - -#### `argv` - -``` purescript -argv :: forall eff. Eff (process :: PROCESS | eff) (Array String) -``` - -Get an array containing the command line arguments. Be aware -that this can change over the course of the program. - -#### `execArgv` - -``` purescript -execArgv :: forall eff. Eff (process :: PROCESS | eff) (Array String) -``` - -Node-specific options passed to the `node` executable. Be aware that -this can change over the course of the program. - -#### `execPath` - -``` purescript -execPath :: forall eff. Eff (process :: PROCESS | eff) String -``` - -The absolute pathname of the `node` executable that started the -process. - -#### `chdir` - -``` purescript -chdir :: forall eff. String -> Eff (err :: EXCEPTION, process :: PROCESS | eff) Unit -``` - -Change the current working directory of the process. If the current -directory could not be changed, an exception will be thrown. - -#### `cwd` - -``` purescript -cwd :: forall eff. Eff (process :: PROCESS | eff) String -``` - -Get the current working directory of the process. - -#### `getEnv` - -``` purescript -getEnv :: forall eff. Eff (process :: PROCESS | eff) (StrMap String) -``` - -Get a copy of the current environment. - -#### `lookupEnv` - -``` purescript -lookupEnv :: forall eff. String -> Eff (process :: PROCESS | eff) (Maybe String) -``` - -Lookup a particular environment variable. - -#### `setEnv` - -``` purescript -setEnv :: forall eff. String -> String -> Eff (process :: PROCESS | eff) Unit -``` - -Set an environment variable. - -#### `Pid` - -``` purescript -newtype Pid - = Pid Int -``` - -#### `pid` - -``` purescript -pid :: Pid -``` - -#### `platform` - -``` purescript -platform :: Platform -``` - -#### `exit` - -``` purescript -exit :: forall eff a. Int -> Eff (process :: PROCESS | eff) a -``` - -Cause the process to exit with the supplied integer code. An exit code -of 0 is normally considered successful, and anything else is considered a -failure. - -#### `stdin` - -``` purescript -stdin :: forall eff. Readable () (console :: CONSOLE | eff) -``` - -The standard input stream. Note that this stream will never emit an `end` -event, so any handlers attached via `onEnd` will never be called. - -#### `stdout` - -``` purescript -stdout :: forall eff. Writable () (console :: CONSOLE, err :: EXCEPTION | eff) -``` - -The standard output stream. Note that this stream cannot be closed; calling -`end` will result in an exception being thrown. - -#### `stderr` - -``` purescript -stderr :: forall eff. Writable () (console :: CONSOLE, err :: EXCEPTION | eff) -``` - -The standard error stream. Note that this stream cannot be closed; calling -`end` will result in an exception being thrown. - -#### `stdoutIsTTY` - -``` purescript -stdoutIsTTY :: Boolean -``` - -Check whether the process is being run inside a TTY context - -#### `version` - -``` purescript -version :: String -``` - -Get the Node.js version. - - diff --git a/package.json b/package.json index a5ea2b5..62272ec 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { "private": true, "scripts": { - "postinstall": "pulp dep install", - "build": "jshint src && pulp build && rimraf docs && pulp docs" + "clean": "rimraf output && rimraf .pulp-cache", + "build": "pulp build --censor-lib --strict" }, "devDependencies": { - "jshint": "^2.8.0", - "pulp": "^5.0.2", - "rimraf": "^2.4.4" + "pulp": "^9.0.1", + "purescript-psa": "^0.3.9", + "rimraf": "^2.5.0" } }