Skip to content

Commit f7c70b8

Browse files
Merge pull request #806 from pattern-lab/lerna-monorepo
💣MONOREPO
2 parents bcf60e4 + 58f7ec1 commit f7c70b8

File tree

505 files changed

+46259
-9833
lines changed

Some content is hidden

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

505 files changed

+46259
-9833
lines changed

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Thumbs.db
55
.nyc_output/
66
.vscode/
77
.idea/
8-
test/public
9-
!test/patterns/public/.gitkeep
10-
!test/patterns/testDependencyGraph.json
8+
packages/core/test/public
9+
!packages/core/test/patterns/public/.gitkeep
10+
!packages/core/test/patterns/testDependencyGraph.json
11+
lerna-debug.log

.prettierignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
./package.json
2-
./package-lock.json
3-
./scripts/api.handlebars
4-
./scripts/events.handlebars
1+
**/package.json
2+
**/package-lock.json
3+
./packages/core/scripts/api.handlebars
4+
./packages/core/scripts/events.handlebars

.travis.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
language: node_js
22

3-
node_js:
4-
- node
5-
- 8
6-
- 6
7-
83
before_install:
94
- phantomjs --version
105

116
before_script:
12-
- npm install @pattern-lab/patternengine-node-mustache
13-
- npm install @pattern-lab/patternengine-node-underscore
14-
- npm install @pattern-lab/patternengine-node-handlebars
15-
- npm install patternengine-node-twig
7+
- npm install -g [email protected]
8+
- npm run bootstrap
9+
- lerna add @pattern-lab/engine-mustache
10+
- lerna add @pattern-lab/engine-handlebars
11+
- lerna add @pattern-lab/engine-underscore
12+
- lerna add @pattern-lab/engine-liquid
13+
- lerna add @pattern-lab/engine-twig
14+
- lerna add @pattern-lab/engine-react
1615

1716
branches:
1817
only:

CHANGELOG.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

README.md

Lines changed: 25 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
1-
![Pattern Lab Logo](/patternlab.png 'Pattern Lab Logo')
1+
<p align="center">
2+
<img src='/patternlab.png' height="300" alt="Pattern Lab Logo" />
3+
</p>
4+
5+
# Pattern Lab
6+
7+
This monorepo contains the core of Pattern Lab / Node and all related engines, UI kits, plugins and utilities. Pattern Lab helps you and your team build thoughtful, pattern-driven user interfaces using atomic design principles.
8+
9+
If you'd like to see what a front-end project built with Pattern Lab looks like, check out this [online demo of Pattern Lab output](http://demo.patternlab.io/).
210

311
[![Build Status](https://travis-ci.org/pattern-lab/patternlab-node.svg?branch=master)](https://travis-ci.org/pattern-lab/patternlab-node) ![current release](https://img.shields.io/npm/v/@pattern-lab/patternlab-node.svg) ![license](https://img.shields.io/github/license/pattern-lab/patternlab-node.svg) [![Coverage Status](https://coveralls.io/repos/github/pattern-lab/patternlab-node/badge.svg?branch=master)](https://coveralls.io/github/pattern-lab/patternlab-node?branch=master) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
412
[![node (scoped)](https://img.shields.io/node/v/@pattern-lab/patternlab-node.svg)]()
513
[![Join the chat at Gitter](https://badges.gitter.im/pattern-lab/node.svg)](https://gitter.im/pattern-lab/node)
614

7-
# Pattern Lab Node Core
15+
## Using Pattern Lab
816

9-
This repository contains the core functionality for Pattern Lab Node. Pattern Lab helps you and your team build thoughtful, pattern-driven user interfaces using atomic design principles.
17+
### Installation
1018

11-
[Online Demo of Pattern Lab Output](http://demo.patternlab.io/)
19+
Installation is still in flux due to the monorepo transition. Bear with us as we figure this out.
1220

13-
## Support for Pattern Lab Node
21+
## Support for Pattern Lab
1422

15-
Pattern Lab Node wouldn't be what it is today without the support of the community. It will always be free and open source. Continued development is made possible in part from the support of [these wonderful project supporters](https://github.com/pattern-lab/patternlab-node/wiki/Thanks). If you want to learn more about supporting the project, visit the [Pattern Lab Node Patreon page](https://www.patreon.com/patternlab).
23+
Pattern Lab / Node wouldn't be what it is today without the support of the community. It will always be free and open source. Continued development is made possible in part from the support of [these wonderful project supporters](https://github.com/pattern-lab/patternlab-node/wiki/Thanks). If you want to learn more about supporting the project, visit the [Pattern Lab / Node Patreon page](https://www.patreon.com/patternlab).
1624

1725
**:100: Thanks for support from the following:**
1826

@@ -21,130 +29,24 @@ Pattern Lab Node wouldn't be what it is today without the support of the communi
2129
* [Susan Simkins](https://twitter.com/susanmsimkins)
2230
* [Wilfred Nas](https://twitter.com/wnas)
2331

24-
## Installation
25-
26-
Pattern Lab Node can be used different ways. Editions 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](#ecosystem).
27-
28-
### Direct Consumption
29-
30-
As of Pattern Lab Node 3.X, `patternlab-node` can run standalone, without the need for task runners like gulp or grunt.
31-
32-
`npm install @pattern-lab/patternlab-node`
33-
34-
See [Usage](#usage) for more information.
35-
36-
### Editions
37-
38-
For users wanting a more pre-packaged experience several editions are available.
39-
40-
* [Pattern Lab/Node: Gulp Edition](https://github.com/pattern-lab/edition-node-gulp) contains info how to get started within a Gulp task running environment.
41-
* [Pattern Lab/Node: Grunt Edition](https://github.com/pattern-lab/edition-node-grunt) contains info how to get started within a Grunt task running environment.
42-
* [Pattern Lab/Node: Vanilla Edition](https://github.com/pattern-lab/edition-node) contains info how to get started within a pure node environment.
43-
* [Pattern Lab/Node: Webpack Edition](https://github.com/Comcast/patternlab-edition-node-webpack) contains info how to get started within a webpack environment.
44-
> Thanks to the team at Comcast for open-sourcing this stellar work!
45-
46-
## Ecosystem
47-
48-
![Pattern Lab Ecosystem](http://patternlab.io/assets/pattern-lab-2-image_18-large-opt.png)
49-
50-
Core, and Editions, are part of the [Pattern Lab Ecosystem](http://patternlab.io/docs/advanced-ecosystem-overview.html). With this architecture, we encourage people to write and maintain their own Editions, Starterkits, and even PatternEngines.
51-
52-
## Usage
53-
54-
`patternlab-node` can be required within any Node environment, taking in a configuration file at instantiation.
55-
56-
```javascript
57-
const config = require('./patternlab-config.json');
58-
const patternlab = require('patternlab-node')(config);
59-
60-
// build, optionally watching or choosing incremental builds
61-
patternlab.build({
62-
cleanPublic: true,
63-
watch: true,
64-
});
65-
66-
// or build, watch, and then self-host
67-
patternlab.serve({
68-
cleanPublic: true,
69-
});
70-
```
71-
72-
* Read more about [configuration](http://patternlab.io/docs/advanced-config-options.html#node) via `patternlab-config.json`.
73-
74-
* Read more about the rest of [Public API](./docs), and already implemented for you within [Editions](#editions).
75-
76-
* A full-featured [command line interface](https://github.com/pattern-lab/patternlab-node-cli) is also available courtesy of [@raphaelokon](https://github.com/raphaelokon).
77-
78-
### Events
79-
80-
Many [events](./docs/events.md) are emitted during Pattern Lab operations, originally built to support plugins. Below is a sample, allowing users to be informed of asset or pattern changes.
81-
82-
```javascript
83-
patternlab.serve(...);
84-
85-
patternlab.events.on('patternlab-asset-change', (data) => {
86-
console.log(data); // {file: 'path/to/file.css', dest: 'path/to/destination'}
87-
});
88-
89-
patternlab.events.on('patternlab-pattern-change', (data) => {
90-
console.log(data); // {file: 'path/to/file.ext'}
91-
});
92-
93-
patternlab.events.on('patternlab-global-change', (data) => {
94-
console.log(data); // {file: 'path/to/file.ext'}
95-
});
96-
```
97-
98-
## Development Installation / Workflow
99-
100-
If you are interested in [contributing to Pattern Lab](https://github.com/pattern-lab/patternlab-node/blob/master/.github/CONTRIBUTING.md), it's suggested to install an Edition of your choice and then run a local copy of this repository via [`npm link`](https://docs.npmjs.com/cli/link).
101-
102-
```bash
103-
mkdir /patternlab-node
104-
cd /patternlab-node
105-
git clone https://github.com/pattern-lab/patternlab-node.git
106-
npm install
107-
npm link
108-
cd location/of/editionOrSourceAndConfig
109-
npm link @pattern-lab/patternlab-node
110-
```
111-
112-
The above is a bit verbose, but illustrates:
113-
114-
1. how to clone this repository to an arbitrary location
115-
2. install all dependencies (run `npm install --dev` if your NODE_ENV is production for some reason)
116-
3. setup the `npm link` to your local copy
117-
4. use the local copy of patternlab-node in your edition / working directory
118-
119-
> Make sure to change to whichever branch you intend to hack on or test within your cloned repository, such as `dev` or `bugfix/fixes-broken-unittest`
120-
121-
## Upgrading
122-
123-
If you find yourself here and are looking to upgrade, check out how to upgrade from version to version of Pattern Lab Node here: [https://github.com/pattern-lab/patternlab-node/wiki/Upgrading](https://github.com/pattern-lab/patternlab-node/wiki/Upgrading)
124-
125-
View the [ChangeLog](https://github.com/pattern-lab/patternlab-node/wiki/ChangeLog) for the latest Pattern Lab Node updates.
126-
12732
## Contributing
12833

129-
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.
34+
### Prerequisites
13035

131-
Please read the guidelines: https://github.com/pattern-lab/patternlab-node/blob/master/.github/CONTRIBUTING.md
36+
To get started, you'll need Node 8 or higher. Managing Node with `nvm` is recommended.
13237

133-
## Core Team
38+
### Testing
13439

135-
* [@bmuenzenmeyer](https://github.com/bmuenzenmeyer) - Lead Maintainer
136-
* [@geoffp](https://github.com/geoffp) - Core Contributor
137-
* [@raphaelokon](https://github.com/raphaelokon) - CLI Contributor
138-
* [@tburny](https://github.com/tburny) - Core Contributor
40+
#### Unit tests
13941

140-
## Community
42+
Unit tests are currently in `packages/core`. We use Tap
14143

142-
The Pattern Lab Node team uses [our gitter.im channel, pattern-lab/node](https://gitter.im/pattern-lab/node) to keep in sync, share updates, and talk shop. Please stop by to say hello or as a first place to turn if stuck. Other channels in the Pattern Lab organization can be found on gitter too.
44+
#### Cold start testing
14345

144-
There is also a dedicated Pattern Lab channel on the [design system slack](http://designsystems.herokuapp.com) run by [@jina](https://twitter.com/jina).
46+
To ensure that developers can bootstrap the repo from a fresh clone, do this in your working copy:
14547

146-
Ask or answer Pattern Lab questions on Stack Overflow: http://stackoverflow.com/questions/tagged/patternlab.io
147-
148-
## License
48+
```sh
49+
git reset --hard && git clean -dfx && npm install && npm run bootstrap
50+
```
14951

150-
[MIT](https://github.com/pattern-lab/patternlab-node/blob/master/LICENSE)
52+
This ensures that any changes you've made will still result in a clean and functional developer experience. **Note**: be sure you've committed any outstanding work before doing this -- it will blow away whatever's still outstanding, including anything staged but not commited.

lerna.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"lerna": "2.9.0",
3+
"packages": [
4+
"packages/*"
5+
],
6+
"version": "independent",
7+
"command": {
8+
"init": {
9+
"exact": true
10+
}
11+
}
12+
}

0 commit comments

Comments
 (0)