Skip to content

Pattern Lab Node v3.0.0-alpha.3

Pre-release
Pre-release
Compare
Choose a tag to compare
@bmuenzenmeyer bmuenzenmeyer released this 20 Oct 12:08
· 2852 commits to master since this release

Pattern Lab Node v3.0.0-alpha.3

It's Hacktoberfest!. Find issues you can help with here and get a free T-Shirt.

⚡ ⚡ ⚡ It's finally here - Pattern Lab Node Core 3.0.0! ⚡ ⚡ ⚡

I've been tracking work against #603 and our milestone for quite a while, and now I finally feel like we've reached a point that we can release a preview of what's to come. There is still work to do and I am certain some bugs to work out - but gathering feedback from y'all is a vital next step! There will be a general shakeup (for the better I think( of things in the Edition space - for example. We now also have a coming together of all our development paths - making future work far simpler to orchestrate and get out faster.

Let's address opportunities brought up within #603 and discuss the state of affairs.

It's too hard to use Pattern Lab as a dependency

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

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
});

While much of this API always existed, now core is responsible for copying (and optionally watching) assets, meta files, data, and patterns defined within patternlab-config.json paths. This means that you no longer need gulp, grunt, or any task manager if you dont want to.

Have sass you need to compile? Images you want to optimize? Do it within your existing build chain. Pattern Lab has never endeavored to do that work for you. Pattern Lab now seamlessly integrates into your workflow without having to merge complicated internal tasks.

Want to know what Pattern Lab is doing with assets? Done.

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'}
});

More events are documented on the wiki. I imagine only more will be added now that we have exposed this to consumers.

Pattern Lab build times are increasingly slow with increasing numbers and complexity of patterns

Incremental builds and complete async building should help realize results. Now that the core work has merged a bit too, I know we can devote more energy to performance.

Staying "up to date" with edition-node-gulp/editon-node-grunt is too difficult

Editions are example pairings of Pattern Lab code as part of the Pattern Lab Ecosystem. They were never intended to be installed as dependencies. They are perfect for pre-packaged experiences, and that is what they will remain. I'm excited to say that we now have robust Editions and a robust core - both capable of meeting users where they need to.

Customizing the Pattern Lab UI is not intuitive or for the casual user

Brad is hard at work making this a reality. Pattern Lab Node Core 3.X will support this work as it evolves.

Pattern Lab Node plugin installation is a bit wonky

Plugin installation now adds additional settings to patternlab-config.json, making it far simpler to configure, disable, or delete a plugin after installation.

CHANGELOG 🎯

BREAKING CHANGES

INTERNAL

TOOLING / META

KNOWN ISSUES

UPGRADE INSTRUCTIONS ⌨️

Follow the standard upgrade instructions.

INSTALLATION 📦

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.

UNIT TESTS / ASSERTIONS / CODE COVERAGE 🏗

  • 13 unit tests / assertions were removed, for a total of 483 | travis ci
  • Decreased (-1.8%) to 70.17% | coveralls

ROADMAP 🗺

Keep an eye on the milestones for a clearer understanding of where the project is going in the next few releases.

SUPPORT PATTERN LAB NODE ❤️

I've set up a Patreon account to directly support continued work on the Pattern Lab Node project.

I need help and support to make Pattern Lab Node a sustained success. I devote a lot of free time and would-be sleep to make the project what it is, but nothing compares to hearing back from users. It means the world to me when people find value in Pattern Lab Node. I am ridiculously humbled to hear and see what you all build with it.

If you find yourself here and balk and the idea of supporting open source software monetarily - I understand. Carry on, but please do share what you build - we all learn more together.


The Pattern Lab Node Team 🚀