|
1 |
| -/* |
2 |
| - * patternlab-node - v2.0.0-alpha - 2016 |
3 |
| - * |
| 1 | +/* |
| 2 | + * patternlab-node - v2.0.0-alpha - 2016 |
| 3 | + * |
4 | 4 | * Brian Muenzenmeyer, Geoff Pursell, and the web community.
|
5 |
| - * Licensed under the MIT license. |
6 |
| - * |
7 |
| - * Many thanks to Brad Frost and Dave Olsen for inspiration, encouragement, and advice. |
| 5 | + * Licensed under the MIT license. |
| 6 | + * |
| 7 | + * Many thanks to Brad Frost and Dave Olsen for inspiration, encouragement, and advice. |
8 | 8 | *
|
9 | 9 | */
|
10 | 10 |
|
@@ -254,6 +254,7 @@ var patternlab_engine = function (config) {
|
254 | 254 |
|
255 | 255 | //delete the contents of config.patterns.public before writing
|
256 | 256 | if (deletePatternDir) {
|
| 257 | + fs.removeSync(paths.public.patterns); |
257 | 258 | fs.emptyDirSync(paths.public.patterns);
|
258 | 259 | }
|
259 | 260 |
|
@@ -351,17 +352,19 @@ var patternlab_engine = function (config) {
|
351 | 352 | version: function () {
|
352 | 353 | return getVersion();
|
353 | 354 | },
|
354 |
| - build: function (deletePatternDir) { |
| 355 | + build: function (callback, deletePatternDir) { |
355 | 356 | buildPatterns(deletePatternDir);
|
356 | 357 | buildFrontEnd(patternlab);
|
357 | 358 | printDebug();
|
| 359 | + callback(); |
358 | 360 | },
|
359 | 361 | help: function () {
|
360 | 362 | help();
|
361 | 363 | },
|
362 |
| - patternsonly: function (deletePatternDir) { |
| 364 | + patternsonly: function (callback, deletePatternDir) { |
363 | 365 | buildPatterns(deletePatternDir);
|
364 | 366 | printDebug();
|
| 367 | + callback(); |
365 | 368 | },
|
366 | 369 | liststarterkits: function () {
|
367 | 370 | return listStarterkits();
|
|
0 commit comments