mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-19 05:37:51 +00:00
Regenerate documentation
This commit is contained in:
parent
15c73b6ed5
commit
83d28a86aa
@ -27,6 +27,16 @@
|
||||
</ul>
|
||||
<h2>Class Listing A-Z</h2>
|
||||
<div class='index'>
|
||||
<ul>
|
||||
<li class='letter'>d</li>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='class/DirectoryDoesntExist.html'>
|
||||
DirectoryDoesntExist
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class='letter'>i</li>
|
||||
<ul>
|
||||
@ -172,6 +182,19 @@
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class='letter'>g</li>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='file/lib/resin/vcs/git/git.coffee.html'>
|
||||
git.coffee
|
||||
</a>
|
||||
<small>
|
||||
(lib/resin/vcs/git)
|
||||
</small>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class='letter'>h</li>
|
||||
<ul>
|
||||
@ -266,6 +289,19 @@
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class='letter'>v</li>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='file/lib/resin/vcs/vcs.coffee.html'>
|
||||
vcs.coffee
|
||||
</a>
|
||||
<small>
|
||||
(lib/resin/vcs)
|
||||
</small>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class='letter'>w</li>
|
||||
<ul>
|
||||
@ -283,7 +319,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
161
doc/codo/class/DirectoryDoesntExist.html
Normal file
161
doc/codo/class/DirectoryDoesntExist.html
Normal file
@ -0,0 +1,161 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>CoffeeScript API Documentation</title>
|
||||
<script src='../javascript/application.js'></script>
|
||||
<script src='../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../extra/README.md.html' title='Resin'>
|
||||
Resin
|
||||
</a>
|
||||
»
|
||||
<a href='../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>DirectoryDoesntExist</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
Class:
|
||||
DirectoryDoesntExist
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/resin/errors/errors.coffee</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Inherits:</td>
|
||||
<td>
|
||||
TypedError
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Variables Summary</h2>
|
||||
<dl class='constants'>
|
||||
<dt id='code-variable'>
|
||||
code
|
||||
=
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code class='coffeescript'>1</code></pre>
|
||||
<div class='docstring'>
|
||||
<p>Error code</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>Constructor Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='constructor-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>constructor</b><span>(directory)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Construct a Directory Doesn't Exist error</p><pre><code>throw new resin.errors.DirectoryDoesntExist('/tmp')
|
||||
Error: Directory doesn't exist: /tmp
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>directory</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>the name of the directory that doesn't exist </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -87,7 +87,7 @@ Error: Invalid configuration file: /opt/resin.conf
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -74,7 +74,7 @@ Error: Invalid credentials
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -74,7 +74,7 @@ Error: Invalid key
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -87,7 +87,7 @@ Error: Invalid path: /tmp
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -87,7 +87,7 @@ Error: You don't have any applications
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -87,7 +87,7 @@ Error: Couldn't find application
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -91,7 +91,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -89,6 +89,18 @@
|
||||
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/DirectoryDoesntExist.html' target='main'>
|
||||
DirectoryDoesntExist
|
||||
</a>
|
||||
<small class='parent'>
|
||||
<
|
||||
TypedError
|
||||
</small>
|
||||
<small class='namespace'>
|
||||
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/NotAny.html' target='main'>
|
||||
NotAny
|
||||
|
@ -52,7 +52,9 @@ $ npm install
|
||||
</code></pre><p>If you set <code>DEBUG</code> environment variable, errors will print with a stack trace:</p><pre><code class="lang-sh">$ DEBUG=true resin ...
|
||||
</code></pre>
|
||||
<h2 id="documentation">Documentation</h2><p>You can renegerate the documentation with:</p><pre><code class="lang-sh">$ npm run-script doc
|
||||
</code></pre><p>This should ideally be part of <code>gulp</code>, however there doesn't seems to be any plugin for the documentation generation tool that we're using at the moment (<a href="https://github.com/coffeedoc/codo">codo</a>).</p><h2 id="caveats">Caveats</h2>
|
||||
</code></pre>
|
||||
<h2 id="manual-pages">Manual pages</h2><p>UNIX manual pages reside in <code>doc/</code></p><p>You can regenerate UNIX <code>roff</code> manual pages from markdown with:</p><pre><code class="lang-sh">$ npm run-script man
|
||||
</code></pre><p>If you add a new <code>man</code> page, remember to add the <code>roff</code> filename to the <code>man</code> array in <code>package.json</code>.</p><h2 id="caveats">Caveats</h2>
|
||||
<ul>
|
||||
<li>Some interactive widgets don't work on <a href="https://cygwin.com/">Cygwin</a>. If you're running Windows, it's preferrable that you use <code>cmd.exe</code>.</li>
|
||||
<li>Most commands require an <code><id></code> argument, however <a href="https://github.com/tj/commander.js">Commander</a> refuses to show that in the help page. This will be fixed soon.</li>
|
||||
@ -61,7 +63,7 @@ $ npm install
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -396,7 +396,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -123,7 +123,7 @@ console.log(contents.remoteUrl)
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -173,7 +173,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -41,7 +41,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -190,7 +190,7 @@ console.log(devices)
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -98,7 +98,7 @@ resin.errors.handle(error, shouldExit)
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -109,7 +109,7 @@ console.log(object.dataPrefix) # /opt/resin
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -54,6 +54,7 @@
|
||||
auth: require('./auth/auth'),
|
||||
device: require('./device/device'),
|
||||
os: require('./os/os'),
|
||||
vcs: require('./vcs/vcs'),
|
||||
settings: require('./settings')
|
||||
}</code></pre>
|
||||
|
||||
@ -61,7 +62,7 @@
|
||||
</dl>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -352,7 +352,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -51,7 +51,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -330,7 +330,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -320,7 +320,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -158,7 +158,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -56,7 +56,7 @@
|
||||
</dl>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -160,7 +160,7 @@ console.log(result)
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -108,7 +108,7 @@ for item in result console.log("#{item.id} - #{item.caption}")
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -231,7 +231,7 @@ resin.server.request { method: 'GET' url: '/download' p
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -49,6 +49,7 @@
|
||||
apiPrefix: '/ewa/',
|
||||
dataPrefix: path.join(userHome, '.resin'),
|
||||
sshKeyWidth: 43,
|
||||
gitRemote: 'resin',
|
||||
directories: {
|
||||
plugins: 'plugins',
|
||||
os: 'os'
|
||||
@ -81,7 +82,7 @@
|
||||
</dl>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -239,7 +239,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 10, 14 14:47:17 by
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
745
doc/codo/file/lib/resin/vcs/git/git.coffee.html
Normal file
745
doc/codo/file/lib/resin/vcs/git/git.coffee.html
Normal file
@ -0,0 +1,745 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>CoffeeScript API Documentation</title>
|
||||
<script src='../../../../../javascript/application.js'></script>
|
||||
<script src='../../../../../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../../../../../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../../../../../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../../../../../extra/README.md.html' title='Resin'>
|
||||
Resin
|
||||
</a>
|
||||
»
|
||||
<a href='../../../../../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>lib</span>
|
||||
»
|
||||
<span class='title'>resin</span>
|
||||
»
|
||||
<span class='title'>vcs</span>
|
||||
»
|
||||
<span class='title'>git</span>
|
||||
»
|
||||
<span class='title'>git.coffee</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
File:
|
||||
git.coffee
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/resin/vcs/git</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getGitDirectory-'>
|
||||
~
|
||||
(String)
|
||||
<b>getGitDirectory</b><span>(directory)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='note private title'>Private</span>
|
||||
<span class='desc'>
|
||||
Get git directory for a certain path <p>By git directory, we mean the hidden .git folder that every git repository have</p><pre><code>result = getGitDirectory('/opt/projects/myapp')
|
||||
console.log(result)
|
||||
</code></pre>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getCurrentGitDirectory-'>
|
||||
~
|
||||
(String)
|
||||
<b>getCurrentGitDirectory</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='note private title'>Private</span>
|
||||
<span class='desc'>
|
||||
Get current git directory <p>Get the path to the .git directory in the current directory</p><pre><code>$ cd /Users/me/Projects/foobar && resin ...
|
||||
</code></pre>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#isGitRepository-'>
|
||||
~
|
||||
(void)
|
||||
<b>isGitRepository</b><span>(directory, callback)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='note private title'>Private</span>
|
||||
<span class='desc'>
|
||||
Check if a directory is a git repository <pre><code>isGitRepository 'my/git/repo', (error, isGitRepository) -> throw error if error? if isGitRepository
|
||||
console.log('Yes, it\'s a git repo!') else
|
||||
console.log('I should use git here!')
|
||||
</code></pre>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getRepositoryInstance-'>
|
||||
~
|
||||
(void)
|
||||
<b>getRepositoryInstance</b><span>(directory, callback)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='note private title'>Private</span>
|
||||
<span class='desc'>
|
||||
Get repository instance <p>An instance of a <a href="https://github.com/tuvistavie/node-git-cli">gitCli</a> repository, for internal usage.</p>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#isValidGitApplication-'>
|
||||
~
|
||||
(Boolean)
|
||||
<b>isValidGitApplication</b><span>(application)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='note private title'>Private</span>
|
||||
<span class='desc'>
|
||||
Check if an application is a git app <pre><code>resin.models.application.get 91, (error, application) -> throw error if error? result = isValidGitApplication(application) console.log(result)
|
||||
</code></pre>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#hasRemote-'>
|
||||
~
|
||||
(void)
|
||||
<b>hasRemote</b><span>(repository, name, callback)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='note private title'>Private</span>
|
||||
<span class='desc'>
|
||||
Check if a repository has a certain remote <pre><code>repository = getRepositoryInstance('my/git/repo')
|
||||
hasRemote repository, 'origin', (error, hasRemote) -> throw error if error? if hasRemote
|
||||
console.log('It has an origin remote!') else
|
||||
console.log('It doesn\'t has an origin remote!')
|
||||
</code></pre>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#addRemote-'>
|
||||
~
|
||||
(void)
|
||||
<b>addRemote</b><span>(repository, name, url, callback)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='note private title'>Private</span>
|
||||
<span class='desc'>
|
||||
Add a remote to a git repository <pre><code>repository = getRepositoryInstance('my/git/repo')
|
||||
addRemote repository, 'resin', 'git@git.resin.io:johndoe/app.git', (error) -> throw error if error?
|
||||
|
||||
$ cd my/git/repo && git remote -v
|
||||
resin git@git.resin.io:johndoe/app.git (fetch)
|
||||
resin git@git.resin.io:johndoe/app.git (push)
|
||||
</code></pre>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#initProjectWithApplication-'>
|
||||
~
|
||||
(void)
|
||||
<b>initProjectWithApplication</b><span>(application, directory, callback)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Initialize an application project <ul>
|
||||
<li>Add the corresponding git remote.</li>
|
||||
</ul>
|
||||
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#isResinProject-'>
|
||||
~
|
||||
(void)
|
||||
<b>isResinProject</b><span>(directory, callback)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Check if an application was already initialized <p>It checks if we have a resin remote added already.</p>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Method Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getGitDirectory-'>
|
||||
~
|
||||
(String)
|
||||
<b>getGitDirectory</b><span>(directory)</span>
|
||||
<span class='note private'>Private</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<div class='note'>
|
||||
<strong>Note:</strong>
|
||||
This function doesn't check if the path is valid, it only constructs it.
|
||||
</div>
|
||||
<p>Get git directory for a certain path</p><p>By git directory, we mean the hidden .git folder that every git repository have</p><pre><code>result = getGitDirectory('/opt/projects/myapp')
|
||||
console.log(result)
|
||||
# /opt/projects/myapp/.git
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>directory</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>the directory path </span>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Throws:</h3>
|
||||
<ul class='throw'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt>Error</tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>Will throw if directory is not a string </span>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>the absolute path to the child .git directory </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getCurrentGitDirectory-'>
|
||||
~
|
||||
(String)
|
||||
<b>getCurrentGitDirectory</b><span>()</span>
|
||||
<span class='note private'>Private</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<div class='note'>
|
||||
<strong>Note:</strong>
|
||||
The current directory is determined by from where you ran the app
|
||||
</div>
|
||||
<p>Get current git directory</p><p>Get the path to the .git directory in the current directory</p><pre><code>$ cd /Users/me/Projects/foobar && resin ...
|
||||
result = getCurrentGitDirectory()
|
||||
console.log(result)
|
||||
# /Users/me/Projects/foobar/.git
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>the absolute path to the current directory's .git folder </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='isGitRepository-'>
|
||||
~
|
||||
(void)
|
||||
<b>isGitRepository</b><span>(directory, callback)</span>
|
||||
<span class='note private'>Private</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Check if a directory is a git repository</p><pre><code>isGitRepository 'my/git/repo', (error, isGitRepository) -> throw error if error? if isGitRepository
|
||||
console.log('Yes, it\'s a git repo!') else
|
||||
console.log('I should use git here!')
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>directory</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>the directory </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>callback</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Function</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>callback(error, isGitRepository) </span>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Throws:</h3>
|
||||
<ul class='throw'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt><a href='../../../../../class/DirectoryDoesntExist.html'>DirectoryDoesntExist</a></tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>Will throw if directory doesn't exist </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getRepositoryInstance-'>
|
||||
~
|
||||
(void)
|
||||
<b>getRepositoryInstance</b><span>(directory, callback)</span>
|
||||
<span class='note private'>Private</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Get repository instance</p><p>An instance of a <a href="https://github.com/tuvistavie/node-git-cli">gitCli</a> repository, for internal usage.</p><pre><code>getRepositoryInstance 'my/git/repo', (error, repository) -> throw error if error? # I can now use gitCli functions on `repository`
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>directory</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>the directory </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>callback</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Function</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>callback(error, repository) </span>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Throws:</h3>
|
||||
<ul class='throw'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt>Error</tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>Will throw if directory is not a git repository. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='isValidGitApplication-'>
|
||||
~
|
||||
(Boolean)
|
||||
<b>isValidGitApplication</b><span>(application)</span>
|
||||
<span class='note private'>Private</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<div class='note todo'>
|
||||
<strong>TODO:</strong>
|
||||
We should also test that the string contained in git_repository is a valid url.
|
||||
</div>
|
||||
<div class='note'>
|
||||
<strong>Note:</strong>
|
||||
All it does is check if the application object contains a valid git_repository field.
|
||||
</div>
|
||||
<p>Check if an application is a git app</p><pre><code>resin.models.application.get 91, (error, application) -> throw error if error? result = isValidGitApplication(application) console.log(result) # True
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>application</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Object</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>an application from resin API </span>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt>Boolean</tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>wheter is a valid git application or not </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='hasRemote-'>
|
||||
~
|
||||
(void)
|
||||
<b>hasRemote</b><span>(repository, name, callback)</span>
|
||||
<span class='note private'>Private</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<div class='note todo'>
|
||||
<strong>TODO:</strong>
|
||||
We should extract the logic that lists all remotes into a separate function.
|
||||
</div>
|
||||
<p>Check if a repository has a certain remote</p><pre><code>repository = getRepositoryInstance('my/git/repo')
|
||||
hasRemote repository, 'origin', (error, hasRemote) -> throw error if error? if hasRemote
|
||||
console.log('It has an origin remote!') else
|
||||
console.log('It doesn\'t has an origin remote!')
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>repository</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Object</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>a repository instance from getRepositoryInstance() </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>name</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>the name of the remote to check for </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>callback</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Function</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>callback(error, hasRemote) </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='addRemote-'>
|
||||
~
|
||||
(void)
|
||||
<b>addRemote</b><span>(repository, name, url, callback)</span>
|
||||
<span class='note private'>Private</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<div class='note todo'>
|
||||
<strong>TODO:</strong>
|
||||
We should check the validity of all arguments.
|
||||
</div>
|
||||
<div class='note todo'>
|
||||
<strong>TODO:</strong>
|
||||
This function should be better tested
|
||||
</div>
|
||||
<p>Add a remote to a git repository</p><pre><code>repository = getRepositoryInstance('my/git/repo')
|
||||
addRemote repository, 'resin', 'git@git.resin.io:johndoe/app.git', (error) -> throw error if error?
|
||||
|
||||
$ cd my/git/repo && git remote -v
|
||||
resin git@git.resin.io:johndoe/app.git (fetch)
|
||||
resin git@git.resin.io:johndoe/app.git (push)
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>repository</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Object</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>a repository instance from getRepositoryInstance() </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>name</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>the name of the remote to add </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>url</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>url of the new remote </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>callback</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Function</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>callback(error) </span>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Throws:</h3>
|
||||
<ul class='throw'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt>Error</tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>Will throw if name is not a string </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='initProjectWithApplication-'>
|
||||
~
|
||||
(void)
|
||||
<b>initProjectWithApplication</b><span>(application, directory, callback)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<div class='note todo'>
|
||||
<strong>TODO:</strong>
|
||||
This function should be better tested
|
||||
</div>
|
||||
<div class='note'>
|
||||
<strong>Note:</strong>
|
||||
The directory should already be a git repo (maybe we should take care of git init as well here if necessary?)
|
||||
</div>
|
||||
<p>Initialize an application project</p><ul>
|
||||
<li>Add the corresponding git remote.</li>
|
||||
</ul>
|
||||
<pre><code>resin.models.application.get 91, (error, application) -> throw error if error?
|
||||
initProjectWithApplication application, 'my/new/project', (error) ->
|
||||
throw error if error?
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>application</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Object</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>an application from resin API </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>directory</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>the directory to initialize </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>callback</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Function</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>callback(error) </span>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Throws:</h3>
|
||||
<ul class='throw'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt>Error</tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>Will throw if application is not a valid application </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='isResinProject-'>
|
||||
~
|
||||
(void)
|
||||
<b>isResinProject</b><span>(directory, callback)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<div class='note todo'>
|
||||
<strong>TODO:</strong>
|
||||
Find a way to test this function
|
||||
</div>
|
||||
<p>Check if an application was already initialized</p><p>It checks if we have a resin remote added already.</p><pre><code>isResinProject 'my/resin/app', (error, initialized) -> if initialized
|
||||
console.log('It\'s already a resin app!') else
|
||||
console.log('It\'s just a boring project! It should be resinified!')
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>directory</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>the directory </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>callback</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Function</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>callback(error, isResinProject) </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
230
doc/codo/file/lib/resin/vcs/vcs.coffee.html
Normal file
230
doc/codo/file/lib/resin/vcs/vcs.coffee.html
Normal file
@ -0,0 +1,230 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>CoffeeScript API Documentation</title>
|
||||
<script src='../../../../javascript/application.js'></script>
|
||||
<script src='../../../../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../../../../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../../../../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../../../../extra/README.md.html' title='Resin'>
|
||||
Resin
|
||||
</a>
|
||||
»
|
||||
<a href='../../../../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>lib</span>
|
||||
»
|
||||
<span class='title'>resin</span>
|
||||
»
|
||||
<span class='title'>vcs</span>
|
||||
»
|
||||
<span class='title'>vcs.coffee</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
File:
|
||||
vcs.coffee
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/resin/vcs</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Variables Summary</h2>
|
||||
<dl class='constants'>
|
||||
<dt id='exports.initProjectWithApplication-variable'>
|
||||
exports.initProjectWithApplication
|
||||
=
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code class='coffeescript'>git</code></pre>
|
||||
<div class='docstring'>
|
||||
<div class='note todo'>
|
||||
<strong>TODO:</strong>
|
||||
This function should be better tested
|
||||
</div>
|
||||
<div class='note'>
|
||||
<strong>Note:</strong>
|
||||
The directory should already be a git repo (maybe we should take care of git init as well here if necessary?)
|
||||
</div>
|
||||
<p>Initialize an application project</p><ul>
|
||||
<li>Add the corresponding git remote.</li>
|
||||
</ul>
|
||||
<pre><code>resin.models.application.get 91, (error, application) -> throw error if error?
|
||||
resin.vcs.initProjectWithApplication application, 'my/new/project', (error) ->
|
||||
throw error if error?
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>application</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Object</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>an application from resin API </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>directory</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>the directory to initialize </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>callback</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Function</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>callback(error) </span>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Throws:</h3>
|
||||
<ul class='throw'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt>Error</tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>Will throw if application is not a valid application </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</dd>
|
||||
<dt id='exports.isResinProject-variable'>
|
||||
exports.isResinProject
|
||||
=
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code class='coffeescript'>git</code></pre>
|
||||
<div class='docstring'>
|
||||
<div class='note todo'>
|
||||
<strong>TODO:</strong>
|
||||
Find a way to test this function
|
||||
</div>
|
||||
<p>Check if an application was already initialized</p><p>It checks if we have a resin remote added already.</p><pre><code>resin.vcs.isResinProject 'my/resin/app', (error, initialized) -> if initialized
|
||||
console.log('It\'s already a resin app!') else
|
||||
console.log('It\'s just a boring project! It should be resinified!')
|
||||
</code></pre>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>directory</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>the directory </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>callback</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Function</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>callback(error, isResinProject) </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
December 12, 14 09:26:32 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -289,6 +289,38 @@
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<li>
|
||||
<span>
|
||||
vcs
|
||||
</span>
|
||||
</li>
|
||||
<ul>
|
||||
<li>
|
||||
<span>
|
||||
git
|
||||
</span>
|
||||
</li>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='file/lib/resin/vcs/git/git.coffee.html' target='main'>
|
||||
git.coffee
|
||||
</a>
|
||||
<small class='namespace'>
|
||||
lib/resin/vcs/git
|
||||
</small>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<li>
|
||||
<a href='file/lib/resin/vcs/vcs.coffee.html' target='main'>
|
||||
vcs.coffee
|
||||
</a>
|
||||
<small class='namespace'>
|
||||
lib/resin/vcs
|
||||
</small>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</ul>
|
||||
|
||||
</ul>
|
||||
|
File diff suppressed because one or more lines are too long
@ -37,6 +37,14 @@
|
||||
(PinejsClientRequest)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/resin/vcs/git/git.coffee.html#addRemote-' target='main' title='addRemote'>
|
||||
~addRemote
|
||||
</a>
|
||||
<small>
|
||||
(lib/resin/vcs/git/git.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/resin/log/log.coffee.html#array-' target='main' title='array'>
|
||||
~array
|
||||
@ -69,14 +77,6 @@
|
||||
(lib/resin/token/token.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/NotFound.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(NotFound)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/InvalidPath.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
@ -86,11 +86,11 @@
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/InvalidKey.html#constructor-dynamic' target='main' title='constructor'>
|
||||
<a href='class/NotFound.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(InvalidKey)
|
||||
(NotFound)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
@ -109,6 +109,22 @@
|
||||
(InvalidConfigFile)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/DirectoryDoesntExist.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(DirectoryDoesntExist)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/InvalidKey.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(InvalidKey)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/InvalidCredentials.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
@ -157,14 +173,6 @@
|
||||
(lib/resin/models/device.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/resin/data/data-prefix.coffee.html#get-' target='main' title='get'>
|
||||
~get
|
||||
</a>
|
||||
<small>
|
||||
(lib/resin/data/data-prefix.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/resin/models/application.coffee.html#get-' target='main' title='get'>
|
||||
~get
|
||||
@ -173,6 +181,14 @@
|
||||
(lib/resin/models/application.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/resin/data/data-prefix.coffee.html#get-' target='main' title='get'>
|
||||
~get
|
||||
</a>
|
||||
<small>
|
||||
(lib/resin/data/data-prefix.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/resin/models/device.coffee.html#getAll-' target='main' title='getAll'>
|
||||
~getAll
|
||||
@ -189,6 +205,14 @@
|
||||
(lib/resin/models/application.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/resin/models/device.coffee.html#getAllByApplication-' target='main' title='getAllByApplication'>
|
||||
~getAllByApplication
|
||||
</a>
|
||||
<small>
|
||||
(lib/resin/models/device.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/resin/models/environment-variables.coffee.html#getAllByApplication-' target='main' title='getAllByApplication'>
|
||||
~getAllByApplication
|
||||
@ -198,11 +222,11 @@
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/resin/models/device.coffee.html#getAllByApplication-' target='main' title='getAllByApplication'>
|
||||
~getAllByApplication
|
||||
<a href='file/lib/resin/vcs/git/git.coffee.html#getCurrentGitDirectory-' target='main' title='getCurrentGitDirectory'>
|
||||
~getCurrentGitDirectory
|
||||
</a>
|
||||
<small>
|
||||
(lib/resin/models/device.coffee)
|
||||
(lib/resin/vcs/git/git.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
@ -221,6 +245,22 @@
|
||||
(lib/resin/device/device.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/resin/vcs/git/git.coffee.html#getGitDirectory-' target='main' title='getGitDirectory'>
|
||||
~getGitDirectory
|
||||
</a>
|
||||
<small>
|
||||
(lib/resin/vcs/git/git.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/resin/vcs/git/git.coffee.html#getRepositoryInstance-' target='main' title='getRepositoryInstance'>
|
||||
~getRepositoryInstance
|
||||
</a>
|
||||
<small>
|
||||
(lib/resin/vcs/git/git.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/resin/device/device.coffee.html#getSupportedDevices-' target='main' title='getSupportedDevices'>
|
||||
~getSupportedDevices
|
||||
@ -229,14 +269,6 @@
|
||||
(lib/resin/device/device.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/resin/auth/auth.coffee.html#getToken-' target='main' title='getToken'>
|
||||
~getToken
|
||||
</a>
|
||||
<small>
|
||||
(lib/resin/auth/auth.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/resin/token/token.coffee.html#getToken-' target='main' title='getToken'>
|
||||
~getToken
|
||||
@ -245,6 +277,14 @@
|
||||
(lib/resin/token/token.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/resin/auth/auth.coffee.html#getToken-' target='main' title='getToken'>
|
||||
~getToken
|
||||
</a>
|
||||
<small>
|
||||
(lib/resin/auth/auth.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/resin/errors/errors.coffee.html#handle-' target='main' title='handle'>
|
||||
~handle
|
||||
@ -253,6 +293,14 @@
|
||||
(lib/resin/errors/errors.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/resin/vcs/git/git.coffee.html#hasRemote-' target='main' title='hasRemote'>
|
||||
~hasRemote
|
||||
</a>
|
||||
<small>
|
||||
(lib/resin/vcs/git/git.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/resin/token/token.coffee.html#hasToken-' target='main' title='hasToken'>
|
||||
~hasToken
|
||||
@ -277,6 +325,22 @@
|
||||
(lib/resin/log/log.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/resin/vcs/git/git.coffee.html#initProjectWithApplication-' target='main' title='initProjectWithApplication'>
|
||||
~initProjectWithApplication
|
||||
</a>
|
||||
<small>
|
||||
(lib/resin/vcs/git/git.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/resin/vcs/git/git.coffee.html#isGitRepository-' target='main' title='isGitRepository'>
|
||||
~isGitRepository
|
||||
</a>
|
||||
<small>
|
||||
(lib/resin/vcs/git/git.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/resin/auth/auth.coffee.html#isLoggedIn-' target='main' title='isLoggedIn'>
|
||||
~isLoggedIn
|
||||
@ -293,6 +357,22 @@
|
||||
(lib/resin/log/log.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/resin/vcs/git/git.coffee.html#isResinProject-' target='main' title='isResinProject'>
|
||||
~isResinProject
|
||||
</a>
|
||||
<small>
|
||||
(lib/resin/vcs/git/git.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/resin/vcs/git/git.coffee.html#isValidGitApplication-' target='main' title='isValidGitApplication'>
|
||||
~isValidGitApplication
|
||||
</a>
|
||||
<small>
|
||||
(lib/resin/vcs/git/git.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/resin/config/config.coffee.html#loadUserConfig-' target='main' title='loadUserConfig'>
|
||||
~loadUserConfig
|
||||
@ -350,11 +430,11 @@
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/resin/models/application.coffee.html#remove-' target='main' title='remove'>
|
||||
<a href='file/lib/resin/models/device.coffee.html#remove-' target='main' title='remove'>
|
||||
~remove
|
||||
</a>
|
||||
<small>
|
||||
(lib/resin/models/application.coffee)
|
||||
(lib/resin/models/device.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
@ -366,11 +446,11 @@
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/resin/models/device.coffee.html#remove-' target='main' title='remove'>
|
||||
<a href='file/lib/resin/models/application.coffee.html#remove-' target='main' title='remove'>
|
||||
~remove
|
||||
</a>
|
||||
<small>
|
||||
(lib/resin/models/device.coffee)
|
||||
(lib/resin/models/application.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
|
Loading…
Reference in New Issue
Block a user