aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev/build.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/dev/build.js b/dev/build.js
index b76a769b..52e7d541 100644
--- a/dev/build.js
+++ b/dev/build.js
@@ -122,6 +122,24 @@ function applyModifications(manifest, modifications) {
value.splice(start, deleteCount, ...itemsNew);
}
break;
+ case 'copy':
+ {
+ const {newPath} = modification;
+ const value = getObjectProperties(manifest, path2, path2.length);
+ const newObject = getObjectProperties(manifest, newPath, newPath.length - 1);
+ newObject[newPath[newPath.length - 1]] = value;
+ }
+ break;
+ case 'move':
+ {
+ const {newPath} = modification;
+ const value = getObjectProperties(manifest, path2, path2.length);
+ const oldObject = getObjectProperties(manifest, path2, path2.length - 1);
+ const newObject = getObjectProperties(manifest, newPath, newPath.length - 1);
+ newObject[newPath[newPath.length - 1]] = value;
+ delete oldObject[path2[path2.length - 1]];
+ }
+ break;
}
}
}