Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sagiegurari committed Dec 31, 2016
1 parent bd987ac commit 3deb517
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 29 deletions.
1 change: 1 addition & 0 deletions .bithoundrc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"mocha",
"phantomjs-prebuilt",
"promiscuous",
"remark-lint",
"rimraf",
"sinon",
"sinon-chai",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ See [contributing guide](.github/CONTRIBUTING.md)

| Date | Version | Description |
| ----------- | ------- | ----------- |
| 2016-12-20 | v1.0.21 | Maintenance |
| 2016-12-31 | v1.0.22 | Maintenance |
| 2016-07-26 | v0.1.2 | Add integration test via docker |
| 2016-07-25 | v0.1.1 | Maintenance |
| 2015-02-14 | v0.0.16 | Modified tests and examples due to changes in gopherjs API |
Expand Down
2 changes: 1 addition & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
| Date | Version | Description |
| ----------- | ------- | ----------- |
| 2016-12-20 | v1.0.21 | Maintenance |
| 2016-12-31 | v1.0.22 | Maintenance |
| 2016-07-26 | v0.1.2 | Add integration test via docker |
| 2016-07-25 | v0.1.1 | Maintenance |
| 2015-02-14 | v0.0.16 | Modified tests and examples due to changes in gopherjs API |
Expand Down
32 changes: 16 additions & 16 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ script files as JS files.</p>

* [GoLoader](#GoLoader)
* [new GoLoader()](#new_GoLoader_new)
* [#runGopherJS(goFile, gopherjs)](#GoLoader+runGopherJS) ⇒ <code>object</code>
* [#runGoScript2JS(goFile)](#GoLoader+runGoScript2JS) ⇒ <code>string</code>
* [#loadGoScript(goFile, goModule)](#GoLoader+loadGoScript) ⇒ <code>object</code>
* [#runGopherJS(goFile, gopherjs)](#GoLoader+runGopherJS) ⇒ <code>Object</code>
* [#runGoScript2JS(goFile)](#GoLoader+runGoScript2JS) ⇒ <code>String</code>
* [#loadGoScript(goFile, goModule)](#GoLoader+loadGoScript) ⇒ <code>Object</code>

<a name="new_GoLoader_new"></a>

Expand All @@ -35,42 +35,42 @@ node runtime as JS files.

<a name="GoLoader+runGopherJS"></a>

### GoLoader#runGopherJS(goFile, gopherjs) ⇒ <code>object</code>
### GoLoader#runGopherJS(goFile, gopherjs) ⇒ <code>Object</code>
Runs the gopherjs converter process.

**Returns**: <code>object</code> - The process execution output (see shelljs for more information)
**Returns**: <code>Object</code> - The process execution output (see shelljs for more information)
**Access:** public

| Param | Type | Description |
| --- | --- | --- |
| goFile | <code>string</code> | The google go script file path |
| gopherjs | <code>string</code> | The gopherjs executable file location |
| goFile | <code>String</code> | The google go script file path |
| gopherjs | <code>String</code> | The gopherjs executable file location |

<a name="GoLoader+runGoScript2JS"></a>

### GoLoader#runGoScript2JS(goFile) ⇒ <code>string</code>
### GoLoader#runGoScript2JS(goFile) ⇒ <code>String</code>
Converts the provided go file into JS script text.

**Returns**: <code>string</code> - The JS string of the converted go script
**Returns**: <code>String</code> - The JS string of the converted go script
**Access:** public

| Param | Type | Description |
| --- | --- | --- |
| goFile | <code>string</code> | The google go script file path |
| goFile | <code>String</code> | The google go script file path |

<a name="GoLoader+loadGoScript"></a>

### GoLoader#loadGoScript(goFile, goModule) ⇒ <code>object</code>
### GoLoader#loadGoScript(goFile, goModule) ⇒ <code>Object</code>
Converts the provided google go file into JS script and loads it into
the node runtime.

**Returns**: <code>object</code> - The JS module
**Returns**: <code>Object</code> - The JS module
**Access:** public

| Param | Type | Description |
| --- | --- | --- |
| goFile | <code>string</code> | The go script file path |
| goModule | <code>object</code> | The module for the go script |
| goFile | <code>String</code> | The go script file path |
| goModule | <code>Object</code> | The module for the go script |

<a name="NodeGoRequire"></a>

Expand Down Expand Up @@ -142,6 +142,6 @@ The node require implementation for google go scripts.

| Param | Type | Description |
| --- | --- | --- |
| goModule | <code>object</code> | The module for the go script |
| fileName | <code>string</code> | The go script file name |
| goModule | <code>Object</code> | The module for the go script |
| fileName | <code>String</code> | The go script file name |

16 changes: 8 additions & 8 deletions lib/go-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ function GoLoader() {}
* @function
* @memberof! GoLoader
* @public
* @param {string} goFile - The google go script file path
* @param {string} gopherjs - The gopherjs executable file location
* @returns {object} The process execution output (see shelljs for more information)
* @param {String} goFile - The google go script file path
* @param {String} gopherjs - The gopherjs executable file location
* @returns {Object} The process execution output (see shelljs for more information)
*/
GoLoader.prototype.runGopherJS = function (goFile, gopherjs) {
return shell.exec('"' + gopherjs + '" build "' + goFile + '"', {
Expand All @@ -44,8 +44,8 @@ GoLoader.prototype.runGopherJS = function (goFile, gopherjs) {
* @function
* @memberof! GoLoader
* @public
* @param {string} goFile - The google go script file path
* @returns {string} The JS string of the converted go script
* @param {String} goFile - The google go script file path
* @returns {String} The JS string of the converted go script
*/
GoLoader.prototype.runGoScript2JS = function (goFile) {
//get current working directory
Expand Down Expand Up @@ -94,9 +94,9 @@ GoLoader.prototype.runGoScript2JS = function (goFile) {
* @function
* @memberof! GoLoader
* @public
* @param {string} goFile - The go script file path
* @param {object} goModule - The module for the go script
* @returns {object} The JS module
* @param {String} goFile - The go script file path
* @param {Object} goModule - The module for the go script
* @returns {Object} The JS module
*/
GoLoader.prototype.loadGoScript = function (goFile, goModule) {
var jsString = this.runGoScript2JS(goFile);
Expand Down
4 changes: 2 additions & 2 deletions lib/node-go-require.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ var goLoader = require('./go-loader');
* @alias NodeGoRequire.requireGo
* @memberof! NodeGoRequire
* @public
* @param {object} goModule - The module for the go script
* @param {string} fileName - The go script file name
* @param {Object} goModule - The module for the go script
* @param {String} fileName - The go script file name
*/
var requireGo = function (goModule, fileName) {
goLoader.loadGoScript(fileName, goModule);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-go-require",
"version": "1.0.21",
"version": "1.0.22",
"description": "Load Google GO files as any javascript modules under nodeJS runtime.",
"author": {
"name": "Sagie Gur-Ari",
Expand Down

0 comments on commit 3deb517

Please sign in to comment.