MCPcopy Index your code
hub / github.com/MALSync/MALSync / createJson

Function createJson

webpackConfig/descriptions.js:212–230  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

210
211createJson();
212function createJson() {
213 const pageList = Object.values(allPages);
214 const res = [];
215 for (var page in pageList) {
216 page = pageList[page];
217
218 if (typeof page.domain === 'object') page.domain = page.domain[0];
219 res.push({
220 domain: page.domain,
221 type: page.type,
222 name: page.name,
223 });
224 }
225
226 const descFile = path.join(__dirname, '../src/pages/list.json');
227 fs.writeFile(descFile, JSON.stringify(res, null, 2), 'utf8', function(err) {
228 if (err) return console.log(err);
229 });
230}

Callers 1

descriptions.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected