MCPcopy Create free account
hub / github.com/thetarnav/solid-devtools / setup

Function setup

build.ts:107–135  ·  view source on GitHub ↗
(build)

Source from the content-addressed store, hash-verified

105 let deps_plugin: esb.Plugin = {
106 name: 'wait-for-deps',
107 setup(build) {
108
109 let begin = performance.now()
110
111 build.onStart(() => {
112 if (config.task.done) {
113 config.task = make_build_task()
114 }
115 begin = performance.now()
116 })
117
118 build.onEnd(() => {
119 // eslint-disable-next-line no-console
120 console.log(`\x1b[36m${config.pkg_json.name}\x1b[0m built in \x1b[33m${(performance.now()-begin).toFixed()}ms\x1b[0m`)
121 config.task.resolve()
122 })
123
124 /* Wait for each dependency to be done when requested */
125 for (let dep of deps_configs.values()) {
126 build.onResolve({filter: new RegExp('^'+dep.pkg_json.name)}, async args => {
127 if (!dep.task.done) {
128 // eslint-disable-next-line no-console
129 console.log(`\x1b[36m${config.pkg_json.name}\x1b[0m waits on \x1b[36m${args.path}\x1b[0m`)
130 await dep.task.promise
131 }
132 return null
133 })
134 }
135 },
136 }
137
138 config.options.plugins = [

Callers

nothing calls this directly

Calls 1

make_build_taskFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…