Skip to content

Commit

Permalink
Merge pull request #50 from 75lb/master
Browse files Browse the repository at this point in the history
Reducing amount of code needed in readme template
  • Loading branch information
adam-lynch committed Sep 15, 2014
2 parents 3e78d1f + 157f326 commit a009780
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 30 deletions.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ if(!copyPath) {
As a reference you can use the [example](https://github.com/edjafarov/updater/blob/master/app/index.html).

<a name="new_updater"></a>
###new updater(manifest)
####new updater(manifest)
Creates new instance of updater. Manifest could be a `package.json` of project.

Note that compressed apps are assumed to be downloaded in the format produced by [node-webkit-builder](https://github.com/mllrsohn/node-webkit-builder) (or [grunt-node-webkit-builder](https://github.com/mllrsohn/grunt-node-webkit-builder)).
Expand All @@ -88,7 +88,7 @@ Note that compressed apps are assumed to be downloaded in the format produced by
- manifest `object` - See the [manifest schema](#manifest-schema) below.

<a name="updater#checkNewVersion"></a>
###updater.checkNewVersion(cb)
####updater.checkNewVersion(cb)
Will check the latest available version of the application by requesting the manifest specified in `manifestUrl`.

The callback will always be called; the second parameter indicates whether or not there's a newer version.
Expand All @@ -99,7 +99,7 @@ This function assumes you use [Semantic Versioning](http://semver.org) and enfor
- cb `function` - Callback arguments: error, newerVersionExists (`Boolean`), remoteManifest

<a name="updater#download"></a>
###updater.download(cb, newManifest)
####updater.download(cb, newManifest)
Downloads the new app to a template folder

**Params**
Expand All @@ -109,17 +109,17 @@ Downloads the new app to a template folder

**Returns**: `Request` - Request - stream, the stream contains `manifest` property with new manifest and 'content-length' property with the size of package.
<a name="updater#getAppPath"></a>
###updater.getAppPath()
####updater.getAppPath()
Returns executed application path

**Returns**: `string`
<a name="updater#getAppExec"></a>
###updater.getAppExec()
####updater.getAppExec()
Returns current application executable

**Returns**: `string`
<a name="updater#unpack"></a>
###updater.unpack(filename, cb, manifest)
####updater.unpack(filename, cb, manifest)
Will unpack the `filename` in temporary folder.
For Windows, [unzip](https://www.mkssoftware.com/docs/man1/unzip.1.asp) is used.

Expand All @@ -130,7 +130,7 @@ For Windows, [unzip](https://www.mkssoftware.com/docs/man1/unzip.1.asp) is used.
- manifest `object`

<a name="updater#runInstaller"></a>
###updater.runInstaller(appPath, args, options)
####updater.runInstaller(appPath, args, options)
Runs installer

**Params**
Expand All @@ -141,7 +141,7 @@ Runs installer

**Returns**: `function`
<a name="updater#install"></a>
###updater.install(copyPath, cb)
####updater.install(copyPath, cb)
Installs the app (copies current application to `copyPath`)

**Params**
Expand All @@ -150,7 +150,7 @@ Installs the app (copies current application to `copyPath`)
- cb `function` - Callback arguments: error

<a name="updater#run"></a>
###updater.run(execPath, args, options)
####updater.run(execPath, args, options)
Runs the app from original app executable path.

**Params**
Expand All @@ -159,6 +159,7 @@ Runs the app from original app executable path.
- args `array` - Arguments passed to the app being ran.
- options `object` - Optional. See `spawn` from nodejs docs.


---

## Manifest Schema
Expand Down
26 changes: 5 additions & 21 deletions docs/README.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -77,27 +77,11 @@ if(!copyPath) {

As a reference you can use the [example](https://github.com/edjafarov/updater/blob/master/app/index.html).

{{heading-depth-bump~}}
{{#if (constructorHasDocs)}}{{set "isConstructor" true~}}{{>function}}{{/if~}}
{{~#each (groupByKind (children))~}}
{{#if (equal kind "member")}}{{>member}}{{/if~}}
{{#if (equal kind "function")}}{{>function}}{{/if~}}
{{#if (equal kind "namespace")}}{{>namespace}}{{/if~}}
{{#if (equal kind "constant")}}{{>constant}}{{/if~}}
{{#if (equal kind "typedef")}}{{>typedef}}{{/if~}}
{{#if (equal kind "event")}}{{>event}}{{/if~}}
{{~#if (equal kind "class")~}}
{{set "isConstructor" false~}}
{{~#unless (equal kind "class")~}}
{{>head~}}
{{/unless~}}
{{>body~}}
{{>members~}}
{{/if~}}
{{#if (equal kind "module")}}{{>module}}{{/if~}}
{{/each~}}
{{heading-depth-drop~}}

{{heading-depth-set 2~}}
{{#class name="updater"~}}
{{>body~}}
{{>members~}}
{{/class}}
---
## Manifest Schema
Expand Down

0 comments on commit a009780

Please sign in to comment.