-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["minify"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
lib | ||
tmp |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module.exports = { | ||
plugins: ['jest'], | ||
rules: { | ||
'space-before-function-paren': ['error', { | ||
anonymous: 'never', | ||
named: 'never', | ||
asyncArrow: 'never' | ||
}], | ||
camelcase: 'off' | ||
}, | ||
env: { | ||
'jest/globals': true | ||
}, | ||
"globals": { | ||
"pgb": true | ||
}, | ||
extends: ['plugin:jest/recommended', 'standard'] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
npm-debug.log* | ||
node_modules | ||
*.log | ||
tmp | ||
yarn.lock | ||
package-lock.json | ||
releases |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/* | ||
!bin/* | ||
!lib/* | ||
!completions/* |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2016 Brett Rudd | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# pgb-cli <a href=https://www.npmjs.com/package/pgb-cli><img alt=npm src=https://badge.fury.io/js/pgb-cli.svg></a> | ||
This is a nodejs CLI module to access [PhoneGap Build](https://build.phonegap.com). | ||
|
||
The CLI can be installed by | ||
|
||
```bash | ||
> yarn global add pgb-cli | ||
|
||
or | ||
|
||
> npm install -g pgb-cli | ||
|
||
or | ||
|
||
> brew tap phonegap-build/build | ||
> brew install bash-completion or zsh-completions # only required for command completion | ||
> brew install pgb | ||
``` | ||
|
||
If you don't have (or don't want) node installed you can download executables for Mac OSX, Linux and Windows [here](https://github.com/phonegap-build/pgb-cli/releases/latest) | ||
|
||
Here is a snippet to print out your apps to the console: | ||
|
||
```bash | ||
> pgb ls | ||
``` | ||
|
||
Here is the full list of commands: | ||
|
||
``` | ||
Usage: pgb [OPTIONS] COMMAND [arg...] | ||
pgb [ --help | -? | --version | -v ] | ||
Options: | ||
-d, --debug Enable debug mode | ||
-f, --force Skip confirmation | ||
-j, --json Print raw json | ||
--no-progress Don't show progress | ||
-c, --no-colours Don't use colors | ||
-v, --version Print version | ||
-?, --help Print usage | ||
-b, --bare Print numerical ids | ||
Commands: | ||
app Show information about an app | ||
build Build an app | ||
clone Shortcut to update and build a repo backed app | ||
download Download an app package | ||
lock Lock a signing key | ||
log Show a build log | ||
login Sign in to PhoneGap Build | ||
logout Sign out of PhoneGap Build | ||
ls List your apps | ||
key Show information about a signing key | ||
keys List your signing keys | ||
new Create an app from a repository, file or directory | ||
new-key Create a signing key | ||
phonegaps List supported versions of PhoneGap | ||
rm Delete an app | ||
rm-key Delete a signing key | ||
unlock Unlock a signing key | ||
update Update an app | ||
update-key Update a signing key | ||
whoami Show signed in user | ||
Run 'pgb COMMAND --help' for more information on a command | ||
``` | ||
|
||
If you find a bug or have a feature request tell me about it [here](https://github.com/phonegap-build/pgb-cli/issues). | ||
|
||
Follow me on twitter **@brettrudd** |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env node | ||
global.pgb = require('../lib')() | ||
global.pgb.run() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
_pgb_complete() { | ||
COMPREPLY=() | ||
local word="${COMP_WORDS[COMP_CWORD]}" | ||
local args="" | ||
local COUNTER=1 | ||
while [ $COUNTER -le $# ]; do | ||
args="$args ${COMP_WORDS[$COUNTER]}" | ||
let COUNTER=COUNTER+1 | ||
done | ||
local completions="$(pgb $args --completion idx=$((COMP_CWORD-1)) word=$word)" | ||
case $completions in | ||
'') # default | ||
complete -o default -o bashdefault -F _pgb_complete pgb | ||
;; | ||
-x*) # disable completions | ||
complete -F _pgb_complete pgb | ||
;; | ||
-n*) # nospace | ||
COMPREPLY+=( $(compgen -W "${completions:3}" -- "$word") ) | ||
complete -o nospace -F _pgb_complete pgb | ||
;; | ||
*) # use matches only | ||
COMPREPLY+=( $(compgen -W "$completions" -- "$word") ) | ||
complete -F _pgb_complete pgb | ||
;; | ||
esac | ||
} | ||
|
||
complete -F _pgb_complete pgb |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
autoload -Uz compinit && autoload -Uz bashcompinit | ||
compinit && bashcompinit | ||
|
||
_pgb_complete() { | ||
COMPREPLY=() | ||
local word="${COMP_WORDS[COMP_CWORD]}" | ||
local args="" | ||
local COUNTER=1 | ||
while [ $COUNTER -le $# ]; do | ||
args="$args ${COMP_WORDS[$COUNTER]}" | ||
let COUNTER=COUNTER+1 | ||
done | ||
local completions="$(pgb $args --completion idx=$((COMP_CWORD-1)) word=$word)" | ||
case $completions in | ||
'') # default | ||
complete -o default -o bashdefault -F _pgb_complete pgb | ||
;; | ||
-x*) # disable completions | ||
complete -F _pgb_complete pgb | ||
;; | ||
-n*) # nospace | ||
COMPREPLY+=( $(compgen -W "${completions:3}" -- "$word") ) | ||
complete -o nospace -F _pgb_complete pgb | ||
;; | ||
*) # use matches only | ||
COMPREPLY+=( $(compgen -W "$completions" -- "$word") ) | ||
complete -F _pgb_complete pgb | ||
;; | ||
esac | ||
} | ||
|
||
complete -F _pgb_complete pgb |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = { | ||
collectCoverage: true, | ||
verbose: false, | ||
collectCoverageFrom: [ 'src/**/*.js' ], | ||
testRegex: '/test/[^_]*/*.js$', | ||
coverageDirectory: 'tmp/coverage', | ||
setupFiles: [ | ||
'<rootDir>/test/_helpers/globals.js', | ||
'jest-plugin-fs/setup' | ||
], | ||
timers: 'fake', | ||
coverageThreshold: { | ||
global: { | ||
lines: 100, | ||
branches: 100, | ||
statements: 100 | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.