MCPcopy Create free account
hub / github.com/glslify/glslify / callfile

Function callfile

transform.js:182–198  ·  view source on GitHub ↗
(p, glvar, cb)

Source from the content-addressed store, hash-verified

180 }
181 }
182 function callfile (p, glvar, cb) {
183 var mfile = evaluate(p.arguments[0])
184 gresolve(mfile, { basedir: mdir }, function (err, res) {
185 if (err) return d.emit('error', err)
186 var mopts = p.arguments[1] ? evaluate(p.arguments[1]) || {} : {}
187 var d = createDeps({ cwd: path.dirname(res) })
188 d.add(res, ondeps)
189 function ondeps (err, deps) {
190 if (err) return d.emit('error', err)
191 applyPostTransforms(res, deps, mopts, function (err, bsrc) {
192 if (err) return d.emit('error', err)
193 p.update(glvar + '([' + JSON.stringify(bsrc) + '])')
194 cb()
195 })
196 }
197 })
198 }
199 function done () {
200 if (--pending === 0) {
201 out.push(fout.toString())

Callers 1

onnodeFunction · 0.85

Calls 2

evaluateFunction · 0.85
createDepsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…