Skip to content

Commit

Permalink
documentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
ddmitov committed Jan 10, 2017
1 parent 59a765f commit 7fd2be3
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ install:
- npm install

script:
- npm run ci-test
- npm test
32 changes: 15 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,16 @@ phpScriptObject.stdoutFunction = function(stdout) {
elephantHarness.startScript(phpScriptObject);
```

## Electron Demo
* Download the [elephant-harness package](https://github.com/ddmitov/elephant-harness).
* Download the [Electron binary package for your operating system](https://github.com/electron/electron/releases).
* Extract the downloaded elephant-harness package.
* Extract the downloaded Electron binary package inside the previously extracted ``elephant-harness-master/demo`` folder. Confirm merging of the ``resources`` subfolder of Electron with the ``resources`` subfolder of the demo.
* Start the Electron binary.

## NW.js Demo
* Download the [elephant-harness package](https://github.com/ddmitov/elephant-harness).
* Download the [NW.js binary package for your operating system](http://nwjs.io/downloads/).
* Extract the downloaded NW.js binary package. It will create its own folder.
* Extract the downloaded elephant-harness package and copy everything inside its ``elephant-harness-master/demo`` folder in the folder of the NW.js binary.
* Start the NW.js binary.

## Core Dependencies
* ``child_process``
* ``fs``

## External Dependency
The only external dependency of elephant-harness is a PHP interpreter on PATH or any other PHP interpreter identified by its full pathname. elephant-harness npm package test will fail if no ``php`` binary is available on PATH. [Electron](http://electron.atom.io/) and [NW.js](http://nwjs.io/) demo application will fail if no ``php-cgi`` binary is available on PATH.
The only external dependency of elephant-harness is a PHP interpreter on PATH or any other PHP interpreter identified by its full pathname.
elephant-harness npm package test will fail if no ``php`` binary is available on PATH.
[Electron](http://electron.atom.io/) and [NW.js](http://nwjs.io/) demo application will fail if no ``php-cgi`` binary is available on PATH.
``php`` binary should be used in all [Node.js](http://nodejs.org/) command-line applications and test scripts.
``php-cgi`` binary should be used in all [Electron](http://electron.atom.io/) and [NW.js](http://nwjs.io/) applications.

## API

Expand Down Expand Up @@ -128,8 +118,16 @@ var data = document.getElementById('interactive-script-input').value;
phpScriptObject.scriptHandler.stdin.write(data + '\n');
```

## PHP Interpreter
Any PHP interpreter is usable for elephant-harness - either a PHP interpreter on PATH or a PHP interpreter identified by its full pathname. ``php`` binary should be used in all [Node.js](http://nodejs.org/) command-line applications and test scripts. ``php-cgi`` binary should be used in all [Electron](http://electron.atom.io/) and [NW.js](http://nwjs.io/) applications.
## Electron Demo
* Download and extract the [elephant-harness package](https://github.com/ddmitov/elephant-harness).
* Download the [Electron binary package for your operating system](https://github.com/electron/electron/releases) and extract it inside the previously extracted ``elephant-harness-master/demo`` folder. Confirm merging of the ``resources`` subfolder of Electron with the ``resources`` subfolder of the demo.
* Start the Electron binary.

## NW.js Demo
* Download and extract the [elephant-harness package](https://github.com/ddmitov/elephant-harness).
* Download and extract the [NW.js binary package for your operating system](http://nwjs.io/downloads/). It will create its own folder.
* Copy everything inside the ``elephant-harness-master/demo`` folder in the folder of the NW.js binary.
* Start the NW.js binary.

## [Thanks and Credits](./CREDITS.md)

Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ install:
test_script:
- node --version
- npm --version
- npm run ci-test
- npm test

build: off
2 changes: 1 addition & 1 deletion demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "elephant-harness-demo-nw.js",
"version": "0.4.1",
"version": "0.4.2",
"description": "elephant-harness nw.js demo",
"keywords": [
"php",
Expand Down
2 changes: 1 addition & 1 deletion demo/resources/app/elephant-harness/elephant-harness.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

// elephant-harness version 0.4.1
// elephant-harness version 0.4.2
// Node.js - Electron - NW.js controller for PHP scripts
// elephant-harness is licensed under the terms of the MIT license.
// Copyright (c) 2016 - 2017 Dimitar D. Mitov
Expand Down
2 changes: 1 addition & 1 deletion demo/resources/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "elephant-harness-demo-electron",
"version": "0.4.1",
"version": "0.4.2",
"description": "elephant-harness electron demo",
"main": "main.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion elephant-harness.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

// elephant-harness version 0.4.1
// elephant-harness version 0.4.2
// Node.js - Electron - NW.js controller for PHP scripts
// elephant-harness is licensed under the terms of the MIT license.
// Copyright (c) 2016 - 2017 Dimitar D. Mitov
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
{
"name": "elephant-harness",
"version": "0.4.1",
"version": "0.4.2",
"description": "Node.js - Electron - NW.js controller for PHP scripts",
"main": "elephant-harness.js",
"directories": {
"test": "test"
},
"scripts": {
"test": "nodejs test/elephant-harness-test.js",
"ci-test": "node test/elephant-harness-test.js"
"test": "node test/elephant-harness-test.js"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 7fd2be3

Please sign in to comment.