@cley_faye/boilerplate 3.7.1 → 3.7.2
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.
- package/lib/grunt/reactapp.js +3 -2
- package/package.json +1 -1
package/lib/grunt/reactapp.js
CHANGED
|
@@ -49,7 +49,7 @@ var HandlerType;
|
|
|
49
49
|
HandlerType["COPY"] = "copy";
|
|
50
50
|
})(HandlerType = exports.HandlerType || (exports.HandlerType = {}));
|
|
51
51
|
const gatherTasks = (handlers, gruntConfig, targetName, options) => Object.keys(handlers)
|
|
52
|
-
.reduce((acc, cur) => acc.concat((options?.[cur] &&
|
|
52
|
+
.reduce((acc, cur) => acc.concat((options?.[cur] && options[cur]?.disabled)
|
|
53
53
|
? []
|
|
54
54
|
: handlers[cur](gruntConfig, targetName, (options?.[cur]) ?? {})), []);
|
|
55
55
|
const mergeResults = (tasksResults) => tasksResults.reduce((acc, cur) => {
|
|
@@ -184,7 +184,8 @@ const reactApp = (gruntConfig, targetName = "reactApp", options) => {
|
|
|
184
184
|
};
|
|
185
185
|
const tasksResults = gatherTasks(handlers, gruntConfig, targetName, options);
|
|
186
186
|
const mergedResults = mergeResults(tasksResults);
|
|
187
|
-
|
|
187
|
+
if (!options?.copy?.disabled)
|
|
188
|
+
createCopyTask(gruntConfig, targetName, mergedResults, options);
|
|
188
189
|
// Add grunt-contrib-watch task
|
|
189
190
|
createWatchTasks(gruntConfig, mergedResults, options?.watch);
|
|
190
191
|
return mergedResults.requiredTasks;
|