MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / generateDataDefinitions

Method generateDataDefinitions

tools/mcmanifest.js:118–148  ·  view source on GitHub ↗
(tool)

Source from the content-addressed store, hash-verified

116 this.close();
117 }
118 generateDataDefinitions(tool) {
119 if (tool.platform == "zephyr") {
120 for (var result of tool.dataFiles) {
121 this.write("list(APPEND mDATA ${DATA_DIR}");
122 this.write("/");
123 this.write(result.target);
124 this.line(")");
125 }
126 tool.nodeRedExtracts?.forEach((source, target) => {
127 this.write("list(APPEND mDATA ${DATA_DIR}");
128 this.write("/");
129 this.write(target);
130 this.line(")");
131 });
132 }
133 else {
134 this.write("DATA =");
135 for (var result of tool.dataFiles) {
136 this.write("\\\n\t$(DATA_DIR)");
137 this.write(tool.slash);
138 this.write(result.target);
139 }
140 tool.nodeRedExtracts?.forEach((source, target) => {
141 this.write("\\\n\t$(DATA_DIR)");
142 this.write(tool.slash);
143 this.write(target);
144 });
145 }
146 this.line("");
147 this.line("");
148 }
149 generateDataRules(tool) {
150 for (var result of tool.dataFiles) {
151 var source = result.source;

Callers 1

generateDefinitionsMethod · 0.95

Calls 2

writeMethod · 0.65
lineMethod · 0.45

Tested by

no test coverage detected