Skip to content

Commit

Permalink
Moving generator
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Selman committed Jan 30, 2017
0 parents commit 602e077
Show file tree
Hide file tree
Showing 62 changed files with 2,730 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
coverage
node_modules
out
chaincode/src/**
lib/parser/parser.js
generators/**/templates/**
47 changes: 47 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
env:
es6: true
node: true
mocha: true
extends: 'eslint:recommended'
parserOptions:
sourceType:
- script
rules:
indent:
- error
- 4
linebreak-style:
- error
- unix
quotes:
- error
- single
semi:
- error
- always
no-unused-vars:
- error
- args: none
no-console: off
curly: error
eqeqeq: error
no-throw-literal: error
strict: error
no-var: error
dot-notation: error
no-tabs: error
no-trailing-spaces: error
# no-use-before-define: error
no-useless-call: error
no-with: error
operator-linebreak: error
require-jsdoc:
- error
- require:
ClassDeclaration: true
MethodDefinition: true
FunctionDeclaration: true
valid-jsdoc:
- error
- requireReturn: false
yoda: error
54 changes: 54 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Generated Diagrams
docs/diagrams

# JSDoc
out

# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

# Mac files.
**/.DS_Store

chaincode/bin
chaincode/pkg

# Vscode settings
.vscode

*.swp
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
language: node_js
node_js:
- '4'
addons:
apt:
packages:
- graphviz
dist: trusty
sudo: required
services:
- docker
before_install: |
set -ev
npm install -g npm
npm config set @ibm:registry https://npm-registry.whitewater.ibm.com
npm config set //npm-registry.whitewater.ibm.com/:_authToken ${NPM_TOKEN}
install: ./scripts/install-deps.sh
after_success: ./scripts/push-docs.sh
script: |
set -ev
./scripts/run-all-scripts.sh
8 changes: 8 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
IBM Confidential
OCO Source Materials
IBM Concerto - Blockchain Solution Framework
Copyright IBM Corp. 2016

The source code for this program is not published or otherwise
divested of its trade secrets, irrespective of what has
been deposited with the U.S. Copyright Office.
73 changes: 73 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# generator-concerto
This is a Yeoman module for a set of Yeoman geneators. These are used to create pro-forma templates for using with the IBM Blockchain Framework.
There are two current generators that can be used from the point of creating a model through to creating command line applications

The naming of this repository is following the Yeoman naming conventions.

# How do I use the generator to create an applications?
This is a quick recap of the official [Yeoman getting started](http://yeoman.io/learning/index.html) docs.

*Step 1:* Make sure that you have Yeoman installed globally

```
npm install -g yo
```

*Step 2:* Install 'angular-cli' globally

```
npm install -g angular-cli
```


*Step 3:* Install 'typings' globally

```
npm install -g typings
```


*Step 4:* Install 'bower' globally

```
npm install -g bower
```


*Step 5:* At the moment, the generator module needs to be cloned and linked.

```
git clone [email protected]:Blockchain-WW-Labs/generator-concerto.git
cd generator-concerto
npm link
```


# What are the generators I can use?

##> yo concerto:app

### Description
This command generates a basic command line application which can deploy a business network and list all the asset registries.

### Limitations
- None

### Supported Examples
- DigitalProperty-Network



##> yo concerto:angular

### Description
This command generates an Angular2 application which can connect to a business network and perform create, read, update and delete operations on assets.

### Limitations
- The generated application currently does not handle operations regarding participants and transactions
- The generator currently lacks certain customization and options
- Due to time restraints, the generator hasn't been tested with models which use arrays
- The generated application doesn't handle the resolution of object properties, but instead will list them as being an object type.

### Supported Examples
- CarAuction-Network
Loading

0 comments on commit 602e077

Please sign in to comment.