Skip to content

cli package cleanPublic option broken #1024

@kryp71c

Description

@kryp71c

I am using Pattern Lab Node v3.0.0-beta.3 on Mac, with Node v10.15.0, using a Vanilla Edition.

Expected Behavior

Setting "cleanPublic": true in patternlab-config.json should remove the destination directory before compiling.

Actual Behavior

The cleanPublic setting has no effect.

The build.js file in the cli package currently passes a boolean literal to the patternlab build and patternsonly methods. However these methods expect an object with a key of "cleanPublic". Consequentially a check in buildPatterns.js (of core) then evaluates incrementalBuildsEnabled as true. This in turn prevents the destination directory from being "cleaned".

Instead of the boolean literal the whole config object should be passed as an argument, which fixes the issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions