@pattern-lab/patternlab-node
Pattern Lab is a collection of tools to help you create atomic design systems. This is the node command line interface (CLI).
Last updated 2 years ago by bmuenzenmeyer .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @pattern-lab/patternlab-node 
SYNC missed versions from official npm registry.

Pattern Lab Logo

Build Status current release license Coverage Status code style: prettier node (scoped) Join the chat at Gitter

Pattern Lab Node Core

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.

Online Demo of Pattern Lab Output

Support for Pattern Lab Node

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. If you want to learn more about supporting the project, visit the Pattern Lab Node Patreon page.

:100: Thanks for support from the following:

Installation

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.

Direct Consumption

As of Pattern Lab Node 3.X, patternlab-node can run standalone, without the need for task runners like gulp or grunt.

npm install @pattern-lab/patternlab-node

See Usage for more information.

Editions

For users wanting a more pre-packaged experience several editions are available.

Ecosystem

Pattern Lab Ecosystem

Core, and Editions, are part of the Pattern Lab Ecosystem. With this architecture, we encourage people to write and maintain their own Editions, Starterkits, and even PatternEngines.

Usage

patternlab-node can be required within any Node environment, taking in a configuration file at instantiation.

const config = require('./patternlab-config.json');
const patternlab = require('patternlab-node')(config);

// build, optionally watching or choosing incremental builds
patternlab.build({
  cleanPublic: true,
  watch: true,
});

// or build, watch, and then self-host
patternlab.serve({
  cleanPublic: true,
});

Events

Many events 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.

patternlab.serve(...);

patternlab.events.on('patternlab-asset-change', (data) => {
  console.log(data); // {file: 'path/to/file.css', dest: 'path/to/destination'}
});

patternlab.events.on('patternlab-pattern-change', (data) => {
  console.log(data); // {file: 'path/to/file.ext'}
});

patternlab.events.on('patternlab-global-change', (data) => {
  console.log(data); // {file: 'path/to/file.ext'}
});

Development Installation / Workflow

If you are interested in contributing to Pattern Lab, it's suggested to install an Edition of your choice and then run a local copy of this repository via npm link.

mkdir /patternlab-node
cd /patternlab-node
git clone https://github.com/pattern-lab/patternlab-node.git
npm install
npm link
cd location/of/editionOrSourceAndConfig
npm link @pattern-lab/patternlab-node

The above is a bit verbose, but illustrates:

  1. how to clone this repository to an arbitrary location
  2. install all dependencies (run npm install --dev if your NODE_ENV is production for some reason)
  3. setup the npm link to your local copy
  4. use the local copy of patternlab-node in your edition / working directory

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

Upgrading

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

View the ChangeLog for the latest Pattern Lab Node updates.

Contributing

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.

Please read the guidelines: https://github.com/pattern-lab/patternlab-node/blob/master/.github/CONTRIBUTING.md

Core Team

Community

The Pattern Lab Node team uses our gitter.im channel, 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.

There is also a dedicated Pattern Lab channel on the design system slack run by @jina.

Ask or answer Pattern Lab questions on Stack Overflow: http://stackoverflow.com/questions/tagged/patternlab.io

License

MIT

Current Tags

  • 3.0.0-alpha.8                                ...           latest (2 years ago)

6 Versions

  • 3.0.0-alpha.8                                ...           2 years ago
  • 3.0.0-alpha.7                                ...           2 years ago
  • 3.0.0-alpha.6                                ...           2 years ago
  • 3.0.0-alpha.5                                ...           3 years ago
  • 3.0.0-alpha.4                                ...           3 years ago
  • 3.0.0-alpha.3                                ...           3 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (15)
Dev Dependencies (12)

Copyright 2014 - 2016 © taobao.org |