Skip to content

aergoio/ship

Repository files navigation

MIT License LoC Travis_ci codecov.io Maintainability

Introduction

The ship makes your development rapid. It suggests the cycle to import, refer, and upload packages.

The ship provides the next:

  • Initialize project
  • Install package from github.com
  • Build project
  • Unit test project
  • Publish to local repository
  • Incremental build
  • Deploy to aergo chain
  • Runner to execute or query contract

Modules

The repository contains next:

  • core
  • web

Project structure

$USER_HOME/
  +.aergo_modules/

$PROJECT_HOME/
  | + xxxx/
  + aergo.json
  • aergo.json - project description file
  • .aergo_modules - modules to be downloaded by ship

Command

  • ship init
  • ship install aergoio/athena-343
  • ship build
    • ship build --watch
    • ship build --watch --port 8080
  • ship test
  • ship publish

Configuration(aergo.json)

  • name: project name
  • source: source file to build
  • target: result when you type 'ship build'
  • dependencies: package dependencies
  • tests: test cases to run
  • endpoint: endpoint to deploy or run (Default value is "localhost:7845")
  • privatekey: private key to deploy or execute contracts
  • password: password to decrypt private key

Examples

{
  "name": "bylee/examples",
  "source": "src/main/lua/main.lua",
  "target": "app.lua",
  "dependencies": ["aergoio/athena-343"],
  "test": ["src/test/lua/test-main.lua"],
  "endpoint": "remotehost:7845"
}

Integration

TBD

Build

Prerequisites

Clone

$ git clone https://github.com/aergoio/ship.git

Build and package

  • Clean
$ ./build.sh clean
  • Install deps
$ ./build.sh deps
  • Create ship web ui
$ ./build.sh npm
  • Run gradle
$ ./build.sh gradle

if you use JDK 9 or over

$ ./gradlew build -x test
  • Assemble distributions
$ ./build.sh assemble

Test

Kind of test

Unit test

They are classes with 'Test' suffix.

Integration test

They are classes with 'IT' suffix meaning integration test.

Benchmark test

They are classes with 'Benchmark' suffix, which using jmh.

Run tests

$ ./build.sh test

Documentation

We provides next in https://aergoio.github.io/ship

  • JavaDoc
  • Test Coverage

Contribution