Skip to content

Commit 1b8946a

Browse files
committed
Propose a place for testing tree, add the React testing tree, and alter lerna.config to match
1 parent 170a11d commit 1b8946a

File tree

105 files changed

+38205
-1
lines changed

Some content is hidden

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

105 files changed

+38205
-1
lines changed

lerna.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"lerna": "2.9.0",
33
"packages": [
4-
"packages/*"
4+
"packages/*",
5+
"testingtrees/*"
56
],
67
"version": "independent",
78
"command": {
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 Pattern Lab
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
![Pattern Lab Logo](/patternlab.png "Pattern Lab Logo")
2+
3+
![current release](https://img.shields.io/github/release/pattern-lab/edition-node-gulp.svg) ![license](https://img.shields.io/github/license/pattern-lab/edition-node-gulp.svg) [![Join the chat at Gitter](https://badges.gitter.im/pattern-lab/node.svg)](https://gitter.im/pattern-lab/node)
4+
5+
# Pattern Lab Node - Gulp Edition
6+
7+
The Gulp wrapper around [Pattern Lab Node Core](https://github.com/pattern-lab/patternlab-node), the default PatternEngine, and supporting frontend assets.
8+
9+
## Packaged Components
10+
11+
This Edition comes with the following components:
12+
13+
* `pattern-lab/patternlab-node`: [GitHub](https://github.com/pattern-lab/patternlab-node) | [npm](https://www.npmjs.com/package/@pattern-lab/patternlab-node)
14+
* `pattern-lab/patternengine-node-mustache`: [GitHub](https://github.com/pattern-lab/patternengine-node-mustache) | [npm](https://www.npmjs.com/package/@pattern-lab/patternengine-node-mustache)
15+
* `pattern-lab/styleguidekit-assets-default`: [GitHub](https://github.com/pattern-lab/styleguidekit-assets-default) | [npm](https://www.npmjs.com/package/@pattern-lab/styleguidekit-assets-default)
16+
* `pattern-lab/styleguidekit-mustache-default`: [GitHub](https://github.com/pattern-lab/styleguidekit-mustache-default) | [npm](https://www.npmjs.com/package/@pattern-lab/styleguidekit-mustache-default)
17+
18+
## Prerequisites
19+
20+
This Edition uses [Node](https://nodejs.org) for core processing, [npm](https://www.npmjs.com/) to manage project dependencies, and [gulp.js](http://gulpjs.com/) to run tasks and interface with the core library. You can follow the directions for [installing Node](https://nodejs.org/en/download/) on the Node website if you haven't done so already. Installation of Node will include npm.
21+
22+
## Installing
23+
24+
Pattern Lab Node can be used different ways. Editions like this one are **example** pairings of Pattern Lab code and do not always have an upgrade path or simple means to run as a dependency within a larger project. Users wishing to be most current and have the greatest flexibility are encouraged to consume `patternlab-node` directly. Users wanting to learn more about Pattern Lab and have a tailored default experience are encouraged to start with an Edition. Both methods still expect to interact with other elements of the [Pattern Lab Ecosystem](https://github.com/pattern-lab/patternlab-node#ecosystem).
25+
26+
As an Edition, the simplist installation sequence is to clone this repository.
27+
28+
``` bash
29+
mkdir newApp && cd newApp
30+
git clone https://github.com/pattern-lab/edition-node-gulp.git
31+
npm install
32+
```
33+
34+
## Getting Started
35+
36+
This edition comes pre-packaged with a couple simple gulp tasks. Extend them as needed.
37+
38+
**build** patterns, copy assets, and construct ui
39+
40+
``` bash
41+
gulp patternlab:build
42+
```
43+
44+
build patterns, copy assets, and construct ui, watch source files, and **serve** locally
45+
46+
``` bash
47+
gulp patternlab:serve
48+
```
49+
50+
logs Pattern Lab Node usage and **help** content
51+
52+
``` bash
53+
gulp patternlab:help
54+
```
55+
56+
To interact further with Pattern Lab Node, such as to install plugins or starterkits, check out the rest of the `gulpfile.js`. You could also install the [Pattern Lab Node Command Line Interface](https://github.com/pattern-lab/patternlab-node-cli) or learn more about the [core API](https://github.com/pattern-lab/patternlab-node#usage).
57+
58+
## Updating Pattern Lab
59+
60+
To update Pattern Lab please refer to each component's GitHub repository, and the [master instructions for core](https://github.com/pattern-lab/patternlab-node/wiki/Upgrading). The components are listed at the top of the README.
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/******************************************************
2+
* PATTERN LAB NODE
3+
* EDITION-NODE-GULP
4+
* The gulp wrapper around patternlab-node core, providing tasks to interact with the core library.
5+
******************************************************/
6+
const gulp = require('gulp');
7+
const argv = require('minimist')(process.argv.slice(2));
8+
9+
/******************************************************
10+
* PATTERN LAB NODE WRAPPER TASKS with core library
11+
******************************************************/
12+
const config = require('./patternlab-config.json');
13+
const patternlab = require('@pattern-lab/core')(config);
14+
15+
function build() {
16+
return patternlab
17+
.build({
18+
watch: argv.watch,
19+
cleanPublic: config.cleanPublic,
20+
})
21+
.then(() => {
22+
// do something else when this promise resolves
23+
});
24+
}
25+
26+
function serve() {
27+
return patternlab
28+
.serve({
29+
cleanPublic: config.cleanPublic,
30+
})
31+
.then(() => {
32+
// do something else when this promise resolves
33+
});
34+
}
35+
36+
gulp.task('patternlab:version', function() {
37+
patternlab.version();
38+
});
39+
40+
gulp.task('patternlab:help', function() {
41+
patternlab.help();
42+
});
43+
44+
gulp.task('patternlab:patternsonly', function() {
45+
patternlab.patternsonly(config.cleanPublic);
46+
});
47+
48+
gulp.task('patternlab:liststarterkits', function() {
49+
patternlab.liststarterkits();
50+
});
51+
52+
gulp.task('patternlab:loadstarterkit', function() {
53+
patternlab.loadstarterkit(argv.kit, argv.clean);
54+
});
55+
56+
gulp.task('patternlab:build', function() {
57+
build().then(() => {
58+
// do something else when this promise resolves
59+
});
60+
});
61+
62+
gulp.task('patternlab:serve', function() {
63+
serve().then(() => {
64+
// do something else when this promise resolves
65+
});
66+
});
67+
68+
gulp.task('patternlab:installplugin', function() {
69+
patternlab.installplugin(argv.plugin);
70+
});
71+
72+
gulp.task('default', ['patternlab:help']);

0 commit comments

Comments
 (0)