Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename module to application #21

Merged
merged 3 commits into from
Nov 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 11 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Aragon CLI

CLI tool for creating, testing and publishing Aragon modules.
CLI tool for creating, testing and publishing Aragon applications.

## Installation

Expand All @@ -11,40 +11,35 @@ npm install -g @aragon/cli
## Usage

```
➜ aragon-example-module aragon-dev-cli --help

Aragon command-line tools
➜ aragon-example-application aragon-dev-cli --help

Usage
$ aragon-dev-cli <subcommand>

Commands
init <name> Initialize a new Aragon module
version <major|minor|patch> Bump the module version
versions List the published versions of this module
publish Publish a new version of the module
playground Inject module into local Aragon application
init <name> Initialize a new Aragon application (e.g. test.aragonpm.eth)
version <major|minor|patch> Bump the application version
versions List the published versions of this application
publish Publish a new version of the application
playground Inject application into local Aragon client

Options
--key <privkey> The Ethereum private key to sign transactions with. Raw transaction will be dumped to stdout if no key is provided.
--registry <registry> The repository registry to use for creating and publishing packages (default: aragonpm.eth)
--rpc A URI to the Ethereum node used for RPC calls (default: https://ropsten.infura.io)
--chain-id The ID of the chain to interact with (default: 3)
--ens-registry Address for the ENS registry (default: canonical ENS for chainId)

Examples
$ aragon-dev-cli version major
New version is 2.0.0

$ aragon-dev-cli init poll --registry=module-corp.eth
Created new module poll.module-corp.eth

$ aragon-dev-cli init cool-app
Created new module cool-app.aragonpm.eth
$ aragon-dev-cli init cool-app.aragonpm.eth
Created new application cool-app.aragonpm.eth
```

## Recipes

### Creating and publishing a module
### Creating and publishing an application

```bash
mkdir polls-app
Expand Down
10 changes: 5 additions & 5 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ const cli = meow(`

Commands
init <name> [template] Initialize a new Aragon module from a template (default template: react). The name must be a valid ENS name.
version <major|minor|patch> Bump the module version
versions List the published versions of this module
publish Publish a new version of the module
playground Inject module into local Aragon application
version <major|minor|patch> Bump the application version
versions List the published versions of this application
publish Publish a new version of the application
playground Inject application into local Aragon client

Options
--key <privkey> The Ethereum private key to sign transactions with. Raw transaction will be dumped to stdout if no key is provided.
Expand All @@ -24,7 +24,7 @@ const cli = meow(`
New version is 2.0.0

$ aragon-dev-cli init cool-app.aragonpm.eth
Created new module cool-app.aragonpm.eth
Created new application cool-app.aragonpm.eth
`, {
default: {
rpc: 'https://ropsten.infura.io',
Expand Down
8 changes: 4 additions & 4 deletions src/handle.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const handlers = {
const basename = name.split('.')[0]
reporter.info(`Cloning ${template} into ${basename}...`)
clone(`https://github.com/${template}`, basename, { shallow: true }, () => {
reporter.info(`Created new module ${name} in ${basename}`)
reporter.info(`Created new application ${name} in ${basename}`)
})
},
versions (_, flags) {
Expand Down Expand Up @@ -198,7 +198,7 @@ const handlers = {
)).pop().hash

// Next!
reporter.info(`Published module to IPFS: ${hash}`)
reporter.info(`Published application to IPFS: ${hash}`)
resolve(hash)
})
})
Expand All @@ -221,7 +221,7 @@ const handlers = {
return
}

reporter.info('This is the first time you are publishing this module')
reporter.info('This is the first time you are publishing this application')
const registry = new eth.Contract(
require('../abi/apm/RepoRegistry.json'),
registryAddress
Expand Down Expand Up @@ -254,7 +254,7 @@ const handlers = {
.then((tx) => {
return eth.sendSignedTransaction(tx.rawTransaction)
.then(({ transactionHash }) => {
reporter.info(`Created module ${appName}@${version} in transaction ${transactionHash}`)
reporter.info(`Created application ${appName}@${version} in transaction ${transactionHash}`)
}, (err) => {
reporter.error(err)
})
Expand Down