Skip to content

Commit 704ce3e

Browse files
Merge pull request #718 from pattern-lab/dev
Pattern Lab Node 3.0.0 Alpha 1
2 parents 3cf5ed4 + 8f376e7 commit 704ce3e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+7307
-1060
lines changed

.eslintrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@
8383
"space-infix-ops": 1,
8484
"valid-typeof": 2,
8585
"vars-on-top": 0,
86-
"wrap-iife": [2, "inside"]
86+
"wrap-iife": [2, "inside"],
87+
"prefer-const": ["error", {
88+
"destructuring": "any",
89+
"ignoreReadBeforeAssign": false
90+
}]
8791
}
8892
}

.github/CONTRIBUTING.md

Lines changed: 50 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,61 @@
1-
# Contributing to Pattern Lab Node
1+
Contributing to Pattern Lab Node
2+
================================
3+
24
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.
35

46
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.
57

6-
## Developing Locally
8+
Developing Locally
9+
------------------
710

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

10-
* Fork this repository on Github.
11-
* Create a new branch in your fork and push your changes in that fork.
12-
* `npm install`
13-
* `npm link`
14-
* `cd /path/to/your/edition`
15-
* `npm link patternlab-node`
13+
- Fork this repository on Github.
14+
- Create a new branch in your fork and push your changes in that fork.
15+
- `npm install`
16+
- `npm link`
17+
- `cd /path/to/your/edition`
18+
- `npm link patternlab-node`
19+
20+
Guidelines
21+
----------
22+
23+
- *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`
24+
- Keep your pull requests concise and limited to **ONE** substantive change at a time. This makes reviewing and testing so much easier.
25+
- Commits should reference the issue you are adressing. For any Pull Request that you send, use the template provided.
26+
- Commits are best formatted using the [conventional commits pattern](https://conventionalcommits.org/).
27+
- If you can, add some unit tests using the existing patterns in the `./test` directory
28+
- 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.
29+
- Mention the issue number in commits, so anyone can see to which issue your changes belong to. For instance:
30+
- `#123 Fix resolving patterns in pattern_hunter`
31+
- `Feature #42: improve improbability drive`
32+
33+
Coding style
34+
------------
1635

17-
## Guidelines
36+
Two files combine within the project to define and maintain our coding style.
1837

19-
* _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`
20-
* Please keep your pull requests concise and limited to **ONE** substantive change at a time. This makes reviewing and testing so much easier.
21-
* Commits should reference the issue you are adressing. For any Pull Request that you send, use the template provided.
22-
* If you can, add some unit tests using the existing patterns in the `./test` directory
23-
* 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.
38+
- The `.editorconfig` controls spaces / tabs within supported editors. Check out their [site](http://editorconfig.org/).
39+
- The `.eslintrc` defines our javascript standards. Some editors will evaluate this real-time - otherwise it's run using `grunt|gulp build`
2440

25-
## Coding style
26-
Two files combine within the project to define and maintain our coding style.
41+
Tests
42+
-----
43+
44+
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.
45+
46+
Branching Scheme
47+
----------------
48+
49+
![branching scheme](branching-scheme.png) Currently Pattern Lab has the following branches:
50+
51+
- **master** contains the latext stable, released version</dd>
52+
- **dev**: for development. *Target pull requests against this branch.*
53+
- **feature-branches** for larger changes. Allows merging all changes into both `dev` easily.
54+
- **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)
55+
56+
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.
57+
58+
Gitter.im Chat
59+
==============
2760

28-
* The `.editorconfig` controls spaces / tabs within supported editors. Check out their [site](http://editorconfig.org/).
29-
* The `.eslintrc` defines our javascript standards. Some editors will evaluate this real-time - otherwise it's run using `grunt|gulp build`
61+
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:

.github/branching-scheme.png

30.6 KB
Loading

.github/gitgraph/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Generating a new graph
2+
======================
3+
4+
This folder uses http://gitgraphjs.com/ for generating the git graph model.
5+
6+
1. Change `patternlab-flow.js` to your needs according to the documentation on http://gitgraphjs.com/
7+
2. Open branching-scheme.html in browse, right click the graph and "Save as...".
8+
3. Overwrite `/.github/branching-scheme.png`
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/gitgraph.js/1.11.4/gitgraph.min.css" />
5+
<style>
6+
body {
7+
margin: 0;
8+
padding: 0;
9+
}
10+
</style>
11+
</head>
12+
<body>
13+
<canvas id="gitGraph"></canvas>
14+
<script src="https://cdnjs.cloudflare.com/ajax/libs/gitgraph.js/1.11.4/gitgraph.min.js"></script>
15+
<script src="patternlab-flow.js"></script>
16+
</body>
17+
</head>

.github/gitgraph/patternlab-flow.js

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
var graphConfig = new GitGraph.Template({
2+
colors: [ "#9993FF", "#47E8D4", "#6BDB52", "#F85BB5", "#FFA657", "#FFCCAA", "#F85BB5" ],
3+
branch: {
4+
lineWidth: 3,
5+
spacingX: 60,
6+
mergeStyle: "straight",
7+
showLabel: true, // display branch names on graph
8+
labelFont: "normal 10pt Arial",
9+
labelRotation: 0,
10+
color: "black"
11+
},
12+
commit: {
13+
spacingY: -30,
14+
dot: {
15+
size: 8,
16+
strokeColor: "#000000",
17+
strokeWidth: 4
18+
},
19+
tag: {
20+
font: "normal 10pt Arial",
21+
color: "yellow"
22+
},
23+
message: {
24+
color: "black",
25+
font: "normal 12pt Arial",
26+
displayAuthor: false,
27+
displayBranch: false,
28+
displayHash: false,
29+
}
30+
},
31+
arrow: {
32+
size: 8,
33+
offset: 3,
34+
35+
}
36+
});
37+
38+
var config = {
39+
template: graphConfig,
40+
mode: "extended",
41+
orientation: "horizontal"
42+
};
43+
44+
var bugFixCommit = {
45+
messageAuthorDisplay: false,
46+
messageBranchDisplay: false,
47+
messageHashDisplay: false,
48+
message: "Bug fix commit(s)"
49+
};
50+
51+
var stabilizationCommit = {
52+
messageAuthorDisplay: false,
53+
messageBranchDisplay: false,
54+
messageHashDisplay: false,
55+
message: "Release stabilization commit(s)"
56+
};
57+
58+
// You can manually fix columns to control the display.
59+
var i = 0;
60+
var longRunningCol = i++;
61+
var featureV3Col = i++;
62+
var developV3Col = i++;
63+
var featureCol = i++;
64+
var developCol = i++;
65+
var releaseCol = i++;
66+
var masterCol = i++;
67+
68+
var gitgraph = new GitGraph(config);
69+
70+
var master = gitgraph.branch({
71+
name: "master",
72+
column: masterCol
73+
});
74+
master.commit("Initial commit");
75+
76+
var develop = gitgraph.branch({
77+
parentBranch: master,
78+
name: "dev",
79+
column: developCol
80+
});
81+
82+
var developV3 = gitgraph.branch({
83+
parentBranch: master,
84+
name: "dev-3.0",
85+
column: developV3Col
86+
});
87+
88+
89+
var longRunning = gitgraph.branch({
90+
parentBranch: master,
91+
name: "long-running-improvement",
92+
column: longRunningCol
93+
});
94+
95+
develop.commit({
96+
messageDisplay: false
97+
});
98+
developV3.commit({
99+
messageDisplay: false
100+
});
101+
102+
longRunning.commit({
103+
messageDisplay: false
104+
});
105+
longRunning.merge(developV3);
106+
107+
var feature1 = gitgraph.branch({
108+
parentBranch: develop,
109+
name: "feature/1-description",
110+
column: featureCol
111+
});
112+
feature1.commit("#1 A feature to go into v2.8.0").commit({
113+
messageDisplay: false
114+
});
115+
develop.merge(feature1);
116+
feature1.commit("Small Bugfix").commit({
117+
messageDisplay: false
118+
});
119+
feature1.merge(develop);
120+
121+
122+
var feature3X = gitgraph.branch({
123+
parentBranch: developV3,
124+
name: "feature/42-feature-for-3-x-only",
125+
column: featureV3Col
126+
});
127+
feature3X.commit("#42 A feature to go into v3.X").commit({
128+
messageDisplay: false
129+
});
130+
feature3X.merge(developV3);
131+
132+
133+
var feature2 = gitgraph.branch({
134+
parentBranch: develop,
135+
name: "feature/2-description",
136+
column: featureCol
137+
});
138+
feature2.commit("#2 Another feature to go into v2.8.0").commit({
139+
messageDisplay: false
140+
});
141+
feature2.merge(develop);
142+
feature2.merge(developV3);
143+
144+
develop.merge(master,{
145+
dotStrokeWidth: 10,
146+
message: "Release v2.8.1 tagged",
147+
tag: "v2.8.1"
148+
});
149+
150+
151+
develop.commit({
152+
messageDisplay: false
153+
});
154+
155+
156+
longRunning.commit({
157+
messageDisplay: false
158+
});
159+
160+
developV3.merge(longRunning);
161+
162+
longRunning.commit({
163+
messageDisplay: false
164+
});
165+
166+
var feature3 = gitgraph.branch({
167+
parentBranch: develop,
168+
name: "bugfix/3-description",
169+
column: featureCol
170+
});
171+
172+
feature3.commit("A feature to go into v2.8.0").commit({
173+
messageDisplay: false
174+
});
175+
feature3.merge(develop);
176+
177+
longRunning.merge(developV3);
178+
179+
developV3.commit({
180+
messageDisplay: false,
181+
dotStrokeWidth: 10
182+
});
183+
184+
185+
develop.commit({
186+
messageDisplay: false
187+
});
188+
189+
develop.commit({
190+
messageDisplay: false
191+
});
192+
193+
develop.merge(master, {
194+
dotStrokeWidth: 10,
195+
message: "Release v2.9.0 tagged",
196+
tag: "v2.9.0"
197+
});
198+
199+
develop.commit({
200+
messageDisplay: false,
201+
dotStrokeWidth: 10
202+
});
203+
204+
developV3.checkout();
205+
206+
/*
207+
developV3.merge(master, {
208+
dotStrokeWidth: 10,
209+
message: "Release v3.0.0 tagged",
210+
tag: "v3.0.0"
211+
});
212+
*/

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ public
1111
!test/patterns/public/.gitkeep
1212
!test/patterns/testDependencyGraph.json
1313
.nyc_output/
14+
.vscode/

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
6.11.3

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ language: node_js
33
node_js:
44
- node
55
- 6
6-
- 4
76

87
before_install:
98
- phantomjs --version
109

1110
before_script:
11+
- npm install patternengine-node-mustache
1212
- npm install patternengine-node-underscore
1313
- npm install patternengine-node-handlebars
1414
- npm install patternengine-node-twig
@@ -17,6 +17,7 @@ branches:
1717
only:
1818
- master
1919
- dev
20+
- dev-3.0
2021

2122
notifications:
2223
webhooks:

0 commit comments

Comments
 (0)