patternlab.io

Are there ways to make pattern lab rebuild quicker (with node)?


For every change I make I need to wait for the files to rebuild. The built takes 80ms to 1.30 minutes.

Is there a way to speed this up?

Are there any dos and don'ts or is this how long it takes no matter what.

I know might be due to many template render request ({{> these}}) but still 1.30 minutes is too long to make any real progress.


Solution

  • Maintainer of Pattern Lab Node here.

    There is an experimental pull request in the works right now that will incrementally build only parts of a pattern tree. Only the changed patterns. It's not completely done yet nor hit the easier consumption methods, but the pull request is here: https://github.com/pattern-lab/patternlab-node/pull/546

    To play with it, clone or fork Pattern Lab Node Core and then npm link it with your edition.

    Then pull down the branch.

    git checkout -b headissue-540-build-changed-patterns-only dev
    git pull https://github.com/headissue/patternlab-node.git 540-build-changed-patterns-only
    

    This is getting into pretty advanced territory, and I make no promises about its reliability - but early testing from some users was positive. If nothing else, know that performance improvements are on the horizon!

    Update The functionality mentioned above is now released in the core package. Read about it on the wiki: https://github.com/pattern-lab/patternlab-node/wiki/Incremental-Builds