@aragon/buidler-aragon
Aragon Buidler plugin
Last updated 4 months ago by aragon-ci .
GPL-3.0-or-later · Original npm · Tarball · package.json
$ cnpm install @aragon/buidler-aragon 
SYNC missed versions from official npm registry.

Aragon Buidler plugin

Buidler plugin for developing Aragon apps with full front end and back end hot reloading.

Required plugins

This plugin currently requires:

Installation

yarn add --dev @aragon/buidler-aragon @nomiclabs/buidler-truffle5 @nomiclabs/buidler-web3 web3

And add the following statement to your buidler.config.js:

usePlugin('@aragon/buidler-aragon')

Tasks

Start task

This plugin provides the "start" task, which allows you to develop an application while visualizing it in the browser.

Task options:

  • openBrowser: Whether or not to automatically open a browser tab with the client when running this task.
  • Please use buidler.config.js for additional options.

Environment extensions

This plugin does not extend the environment.

Usage

To use this plugin, please use create-aragon-app with the buidler boilerplate option. For instructions on how to use this boilerplate, please refer to aragon-buidler-boilerplate.

If you don't want to use a create-aragon-app or a boilerplate, you can follow the structure of the boilerplate linked above. In essence, the regular structure of a Buidler project should do. Please refer to the Buidler docs.

Configuration

This plugin extends BuidlerConfig by adding the following fields:

export interface AragonConfig {
  appServePort?: number
  clientServePort?: number
  appSrcPath?: string
  appBuildOutputPath?: string
  hooks?: AragonConfigHooks
}

Hooks

If you need to perform some tasks before deploying your application's proxy, e.g. deploying a token and passing that token in your proxy's initialize function, you can use the hooks object within the BuidlerConfig object. This object simply contains functions, which, if named correctly, will be called at the appropriate moments in the development pipeline:

export interface AragonConfigHooks {
  preDao?: (bre: BuidlerRuntimeEnvironment) => Promise<void> | void
  postDao?: (
    dao: KernelInstance,
    bre: BuidlerRuntimeEnvironment
  ) => Promise<void> | void
  preInit?: (bre: BuidlerRuntimeEnvironment) => Promise<void> | void
  postInit?: (
    proxy: Truffle.ContractInstance,
    bre: BuidlerRuntimeEnvironment
  ) => Promise<void> | void
  getInitParams?: (bre: BuidlerRuntimeEnvironment) => Promise<any[]> | any[]
  postUpdate?: (
    proxy: Truffle.ContractInstance,
    bre: BuidlerRuntimeEnvironment
  ) => Promise<void> | void
}

For an example on how to use these hooks, please see the token-wrapper tests within the plugin's test projects.

Development

Please refer to the Buidler docs for plugin development.

After cloning this repository, make sure you run npm run dev so that all required contract artifacts are available.

Typescript support

You need to add this to your tsconfig.json's files array: "node_modules/@aragon/buidler-aragon/src/type-extensions.d.ts"

Current Tags

  • 0.1.0-beta.1                                ...           beta (8 months ago)
  • 0.2.9                                ...           latest (4 months ago)

37 Versions

  • 0.2.9                                ...           4 months ago
  • 0.2.8                                ...           5 months ago
  • 0.2.7                                ...           5 months ago
  • 0.2.6                                ...           6 months ago
  • 0.2.6-rc.1                                ...           6 months ago
  • 0.2.5                                ...           6 months ago
  • 0.2.4                                ...           6 months ago
  • 0.2.3                                ...           6 months ago
  • 0.2.2                                ...           7 months ago
  • 0.2.1                                ...           7 months ago
  • 0.2.0                                ...           7 months ago
  • 0.2.0-beta.2                                ...           7 months ago
  • 0.2.0-beta.1                                ...           7 months ago
  • 0.1.0                                ...           8 months ago
  • 0.1.0-beta.2                                ...           8 months ago
  • 0.1.0-beta.1                                ...           8 months ago
  • 0.1.0-alpha.1                                ...           8 months ago
  • 0.0.7                                ...           8 months ago
  • 0.0.6                                ...           8 months ago
  • 0.0.5                                ...           9 months ago
  • 0.0.4                                ...           9 months ago
  • 0.0.3                                ...           9 months ago
  • 0.0.2                                ...           9 months ago
  • 0.0.1-beta.15                                ...           9 months ago
  • 0.0.1-beta.14                                ...           9 months ago
  • 0.0.1-beta.13                                ...           9 months ago
  • 0.0.1-beta.12                                ...           9 months ago
  • 0.0.1-beta.11                                ...           9 months ago
  • 0.0.1-beta.9                                ...           9 months ago
  • 0.0.1-beta.8                                ...           9 months ago
  • 0.0.1-beta.7                                ...           9 months ago
  • 0.0.1-beta.6                                ...           9 months ago
  • 0.0.1-beta.5                                ...           9 months ago
  • 0.0.1-beta.4                                ...           9 months ago
  • 0.0.1-beta.3                                ...           9 months ago
  • 0.0.1-beta.2                                ...           9 months ago
  • 0.0.1-beta.1                                ...           9 months ago
Downloads
Today 0
This Week 0
This Month 38
Last Day 0
Last Week 0
Last Month 4
Dependencies (16)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |