MCPcopy Index your code
hub / github.com/darkreader/darkreader / api

Function api

tasks/build.js:67–85  ·  view source on GitHub ↗
(debug, watch)

Source from the content-addressed store, hash-verified

65}
66
67async function api(debug, watch) {
68 log.ok('API');
69 try {
70 const tasks = [bundleAPI];
71 if (!debug) {
72 tasks.push(codeStyle);
73 }
74 await runTasks(tasks, {platforms: {[PLATFORM.API]: true}, debug, watch, version: false, log: false, test: false});
75 if (watch) {
76 bundleAPI.watch();
77 log.ok('Watching...');
78 }
79 log.ok('MISSION PASSED! RESPECT +');
80 } catch (err) {
81 console.log(err);
82 log.error(`MISSION FAILED!`);
83 process.exit(13);
84 }
85}
86
87async function run({release, debug, platforms, watch, log, test, version}) {
88 const regular = Object.keys(platforms).some((platform) => platform !== PLATFORM.API && platforms[platform]);

Callers 1

runFunction · 0.85

Calls 2

runTasksFunction · 0.90
watchMethod · 0.65

Tested by

no test coverage detected