Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev-3.0-async
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffp committed Oct 24, 2017
2 parents 74243ab + 883cc87 commit 04cd554
Show file tree
Hide file tree
Showing 16 changed files with 482 additions and 85 deletions.
68 changes: 50 additions & 18 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,61 @@
# Contributing to Pattern Lab Node
Contributing to Pattern Lab Node
================================

If you'd like to contribute to Pattern Lab Node, please do so! There is always a lot of ground to cover and something for your wheelhouse.

No pull request is too small. Check out any [up for grabs issues](https://github.com/pattern-lab/patternlab-node/labels/up%20for%20grabs) as a good way to get your feet wet, or add some more unit tests.

## Developing Locally
Developing Locally
------------------

The best way to make changes to the Pattern Lab Node core and test them is through your existing edition.

* Fork this repository on Github.
* Create a new branch in your fork and push your changes in that fork.
* `npm install`
* `npm link`
* `cd /path/to/your/edition`
* `npm link patternlab-node`
- Fork this repository on Github.
- Create a new branch in your fork and push your changes in that fork.
- `npm install`
- `npm link`
- `cd /path/to/your/edition`
- `npm link patternlab-node`

Guidelines
----------

- *ALWAYS* submit pull requests against the [dev branch](https://github.com/pattern-lab/patternlab-node/tree/dev). If this does not occur, I will first, try to redirect you gently, second, attempt to redirect the target branch myself, thirdly, port over your contribution manually if time allows, and/or lastly, close your pull request. If you have a major feature to stabilize over time, talk to @bmuenzenmeyer via an issue about making a dedicated `feature-branch`
- Keep your pull requests concise and limited to **ONE** substantive change at a time. This makes reviewing and testing so much easier.
- Commits should reference the issue you are adressing. For any Pull Request that you send, use the template provided.
- Commits are best formatted using the [conventional commits pattern](https://conventionalcommits.org/).
- If you can, add some unit tests using the existing patterns in the `./test` directory
- Large enhancements should begin with opening an issue. This will result in a more systematic way for us to review your contribution and determine if a [specifcation discussion](https://github.com/pattern-lab/the-spec/issues) needs to occur.
- Mention the issue number in commits, so anyone can see to which issue your changes belong to. For instance:
- `#123 Fix resolving patterns in pattern_hunter`
- `Feature #42: improve improbability drive`

Coding style
------------

## Guidelines
Two files combine within the project to define and maintain our coding style.

* _ALWAYS_ submit pull requests against the [dev branch](https://github.com/pattern-lab/patternlab-node/tree/dev). If this does not occur, I will first, try to redirect you gently, second, port over your contribution manually if time allows, and/or third, close your pull request. If you have a major feature to stabilize over time, talk to @bmuenzenmeyer via an issue about making a dedicated `feature-branch`
* Please keep your pull requests concise and limited to **ONE** substantive change at a time. This makes reviewing and testing so much easier.
* Commits should reference the issue you are adressing. For any Pull Request that you send, use the template provided.
* If you can, add some unit tests using the existing patterns in the `./test` directory
* Large enhancements should begin with opening an issue. This will result in a more systematic way for us to review your contribution and determine if a [specifcation discussion](https://github.com/pattern-lab/the-spec/issues) needs to occur.
- The `.editorconfig` controls spaces / tabs within supported editors. Check out their [site](http://editorconfig.org/).
- The `.eslintrc` defines our javascript standards. Some editors will evaluate this real-time - otherwise it's run using `grunt|gulp build`

## Coding style
Two files combine within the project to define and maintain our coding style.
Tests
-----

Add unit and integration tests if you can. It's always nice if our code coverage improves bit by bit (literally!). We are using [Node Tap](http://www.node-tap.org/) as test framework and [Rewire](https://github.com/jhnns/rewire) for mocking things like file system access.

Branching Scheme
----------------

![branching scheme](branching-scheme.png) Currently Pattern Lab has the following branches:

- **master** contains the latext stable, released version</dd>
- **dev**: for development. *Target pull requests against this branch.*
- **feature-branches** for larger changes. Allows merging all changes into both `dev` easily.
- **long running branches** for changes that involve major changes to the code, architecture and take a lot of time (i.e. making Pattern Lab async)

New features are typically cut off of `dev` branch. When `dev` is stable cut releases by merging `dev` to `master` and creating a release tag.

Gitter.im Chat
==============

* The `.editorconfig` controls spaces / tabs within supported editors. Check out their [site](http://editorconfig.org/).
* The `.eslintrc` defines our javascript standards. Some editors will evaluate this real-time - otherwise it's run using `grunt|gulp build`
If you have any questions or you would like to help, feel free to ask on [our Gitter.im channel](https://gitter.im/pattern-lab/node) :smiley:
Binary file added .github/branching-scheme.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions .github/gitgraph/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Generating a new graph
======================

This folder uses http://gitgraphjs.com/ for generating the git graph model.

1. Change `patternlab-flow.js` to your needs according to the documentation on http://gitgraphjs.com/
2. Open branching-scheme.html in browse, right click the graph and "Save as...".
3. Overwrite `/.github/branching-scheme.png`
17 changes: 17 additions & 0 deletions .github/gitgraph/branching-scheme.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/gitgraph.js/1.11.4/gitgraph.min.css" />
<style>
body {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<canvas id="gitGraph"></canvas>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gitgraph.js/1.11.4/gitgraph.min.js"></script>
<script src="patternlab-flow.js"></script>
</body>
</head>
212 changes: 212 additions & 0 deletions .github/gitgraph/patternlab-flow.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
var graphConfig = new GitGraph.Template({
colors: [ "#9993FF", "#47E8D4", "#6BDB52", "#F85BB5", "#FFA657", "#FFCCAA", "#F85BB5" ],
branch: {
lineWidth: 3,
spacingX: 60,
mergeStyle: "straight",
showLabel: true, // display branch names on graph
labelFont: "normal 10pt Arial",
labelRotation: 0,
color: "black"
},
commit: {
spacingY: -30,
dot: {
size: 8,
strokeColor: "#000000",
strokeWidth: 4
},
tag: {
font: "normal 10pt Arial",
color: "yellow"
},
message: {
color: "black",
font: "normal 12pt Arial",
displayAuthor: false,
displayBranch: false,
displayHash: false,
}
},
arrow: {
size: 8,
offset: 3,

}
});

var config = {
template: graphConfig,
mode: "extended",
orientation: "horizontal"
};

var bugFixCommit = {
messageAuthorDisplay: false,
messageBranchDisplay: false,
messageHashDisplay: false,
message: "Bug fix commit(s)"
};

var stabilizationCommit = {
messageAuthorDisplay: false,
messageBranchDisplay: false,
messageHashDisplay: false,
message: "Release stabilization commit(s)"
};

// You can manually fix columns to control the display.
var i = 0;
var longRunningCol = i++;
var featureV3Col = i++;
var developV3Col = i++;
var featureCol = i++;
var developCol = i++;
var releaseCol = i++;
var masterCol = i++;

var gitgraph = new GitGraph(config);

var master = gitgraph.branch({
name: "master",
column: masterCol
});
master.commit("Initial commit");

var develop = gitgraph.branch({
parentBranch: master,
name: "dev",
column: developCol
});

var developV3 = gitgraph.branch({
parentBranch: master,
name: "dev-3.0",
column: developV3Col
});


var longRunning = gitgraph.branch({
parentBranch: master,
name: "long-running-improvement",
column: longRunningCol
});

develop.commit({
messageDisplay: false
});
developV3.commit({
messageDisplay: false
});

longRunning.commit({
messageDisplay: false
});
longRunning.merge(developV3);

var feature1 = gitgraph.branch({
parentBranch: develop,
name: "feature/1-description",
column: featureCol
});
feature1.commit("#1 A feature to go into v2.8.0").commit({
messageDisplay: false
});
develop.merge(feature1);
feature1.commit("Small Bugfix").commit({
messageDisplay: false
});
feature1.merge(develop);


var feature3X = gitgraph.branch({
parentBranch: developV3,
name: "feature/42-feature-for-3-x-only",
column: featureV3Col
});
feature3X.commit("#42 A feature to go into v3.X").commit({
messageDisplay: false
});
feature3X.merge(developV3);


var feature2 = gitgraph.branch({
parentBranch: develop,
name: "feature/2-description",
column: featureCol
});
feature2.commit("#2 Another feature to go into v2.8.0").commit({
messageDisplay: false
});
feature2.merge(develop);
feature2.merge(developV3);

develop.merge(master,{
dotStrokeWidth: 10,
message: "Release v2.8.1 tagged",
tag: "v2.8.1"
});


develop.commit({
messageDisplay: false
});


longRunning.commit({
messageDisplay: false
});

developV3.merge(longRunning);

longRunning.commit({
messageDisplay: false
});

var feature3 = gitgraph.branch({
parentBranch: develop,
name: "bugfix/3-description",
column: featureCol
});

feature3.commit("A feature to go into v2.8.0").commit({
messageDisplay: false
});
feature3.merge(develop);

longRunning.merge(developV3);

developV3.commit({
messageDisplay: false,
dotStrokeWidth: 10
});


develop.commit({
messageDisplay: false
});

develop.commit({
messageDisplay: false
});

develop.merge(master, {
dotStrokeWidth: 10,
message: "Release v2.9.0 tagged",
tag: "v2.9.0"
});

develop.commit({
messageDisplay: false,
dotStrokeWidth: 10
});

developV3.checkout();

/*
developV3.merge(master, {
dotStrokeWidth: 10,
message: "Release v3.0.0 tagged",
tag: "v3.0.0"
});
*/
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ public
!test/patterns/public/.gitkeep
!test/patterns/testDependencyGraph.json
.nyc_output/
.vscode/
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@ language: node_js

node_js:
- node
- 8
- 6

before_install:
- phantomjs --version

before_script:
- npm install patternengine-node-mustache
- npm install patternengine-node-underscore
- npm install patternengine-node-handlebars
- npm install @pattern-lab/patternengine-node-mustache
- npm install @pattern-lab/patternengine-node-underscore
- npm install @pattern-lab/patternengine-node-handlebars
- npm install patternengine-node-twig

branches:
only:
- master
- dev
- dev-3.0

notifications:
webhooks:
Expand Down
Loading

0 comments on commit 04cd554

Please sign in to comment.