-
Notifications
You must be signed in to change notification settings - Fork 402
Closed
Labels
Description
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.