Skip to content

Commit

Permalink
📝 Updates to contrib notes
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew B White <[email protected]>
  • Loading branch information
mbwhite committed Jan 25, 2017
1 parent 8858357 commit db55520
Show file tree
Hide file tree
Showing 4 changed files with 911 additions and 53 deletions.
57 changes: 4 additions & 53 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,10 @@
# Contributing to Concerto
We welcome contributions to Concerto!

This document explains how you should work with the Concerto repository.
This document explains how you should work with the Concerto repository. More information is in the 'contrib-docs' directory.

## Creating a Mac OS X development environment

### Install Homebrew

Follow the instructions at: http://brew.sh

### Install Node Version Manager

From a terminal window, type:

brew update
brew install nvm
mkdir ~/.nvm
nano ~/.bash_profile

Add these lines to your .bash_profile file:

export NVM_DIR=~/.nvm
source $(brew --prefix nvm)/nvm.sh

Then in a terminal type:

source ~/.bash_profile
echo $NVM_DIR

### Install Required Version of Node

Use the Node Version Manager (nvm) to install the correct version of
Node for Concerto.

In a terminal window type:

nvm install 4.6

Note that if you ever change versions of Node you will need to delete your
node_modules directory and rerun 'npm install'.

### Install dependencies

From a terminal window in the Concerto directory run:

./scripts/install-deps.sh

### Test the environment

You can now run the Unit Tests to test your development environment works.
From your checkout Concerto directory, switch to a terminal and type:

npm install
npm test

The tests should all pass!
* [Suggested ATOM setup](./contrib-notes/atom-setup.md)
* [Step-by-step developement environmnet setup](./contrib-notes/getting-started.md)

## Our development process

Expand Down
86 changes: 86 additions & 0 deletions contrib-notes/atom-setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Using Atom for Concerto development
(Atom)[https://atom.io/] is the favoured development environment by many (possibly all) of the contributors on Concerto and related projects. Atom is at it's most productive would used with a number of plugins. The ones that we have found to be most useful are below and would suggest that you install these when with developing Concerto itself or applications using the Concerto API.

Quik

## Code editing

### Concerto File Highlighting
The very first plugin you should install is a syntax highlighter for the Concerto model files. If you only install one thing, make it this one.

[https://github.ibm.com/Blockchain-WW-Labs/Concerto-Atom]

### esLint
JavaScript dosn't come with a compiler that can pick up silly mistakes, but a linter is an essential tool to help. The one we have used is eslint.

[https://atom.io/packages/linter-eslint]

This is the config file that we have used with eslint
```
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
```

### TODO-Show
This can show easily all the TODO: FUTURE: etc that in the codebase
[https://atom.io/packages/todo-show]

### Highlight selected
Click on a keyword or variable and this will show up the matching instances in the file.
[https://atom.io/packages/highlight-selected]

### DocBlockr
Helps to create skeltion doc comments for Functions
[https://atom.io/packages/docblockr]

## General

### FileIcons
Useful UI enhancement to show different icons for different file Types

[https://atom.io/packages/file-icons]
Loading

0 comments on commit db55520

Please sign in to comment.