@zohodesk/client_build_tool 0.0.10-exp.10 → 0.0.10-exp.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -177,11 +177,8 @@ var _default = {
177
177
  propertiesFolder: null
178
178
  },
179
179
  publicFolders: {
180
- enable: {
181
- value: true,
182
- cli: 'public_Folders'
183
- },
184
- Patterns: ['...']
180
+ dev: ['...'],
181
+ prod: ['...']
185
182
  },
186
183
  app: {
187
184
  entryFile: {
@@ -97,11 +97,8 @@ var _default = {
97
97
  propertiesFolder: null
98
98
  },
99
99
  publicFolders: {
100
- enable: true,
101
- patterns: ['...', {
102
- source: './deskapp/tp/',
103
- target: './tp/'
104
- }]
100
+ dev: ['...'],
101
+ prod: ['...']
105
102
  },
106
103
  app: {
107
104
  entryFile: 'src/index.js',
@@ -43,21 +43,16 @@ function folderPatterns(publicFolders) {
43
43
 
44
44
  function configCopyPublicFolders(options) {
45
45
  let {
46
- enable,
47
- Patterns
48
- } = options.publicFolders;
46
+ publicFolders,
47
+ mode = 'dev'
48
+ } = options;
49
+ publicFolders = (0, _updateArrayWithDefault.updateArrayWithDefault)(publicFolders[mode], defaultPublicFolders);
49
50
 
50
- if (!enable) {
51
+ if (publicFolders.length === 0) {
51
52
  return null;
52
53
  }
53
54
 
54
- Patterns = (0, _updateArrayWithDefault.updateArrayWithDefault)(Patterns, defaultPublicFolders);
55
-
56
- if (Patterns.length === 0) {
57
- return null;
58
- }
59
-
60
- const patterns = folderPatterns(Patterns);
55
+ const patterns = folderPatterns(publicFolders);
61
56
 
62
57
  if (patterns.length === 0) {
63
58
  return null;