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

Function applyPostTransforms

transform.js:225–247  ·  view source on GitHub ↗
(rootFile, deps, mopts, done)

Source from the content-addressed store, hash-verified

223 }
224
225 function applyPostTransforms (rootFile, deps, mopts, done) {
226 var source = glslBundle(deps)
227 var localPosts = [].concat(mopts.transform || []).concat(mopts.t || [])
228 .map(function (transform) {
229 transform = Array.isArray(transform) ? transform : [transform]
230 var name = transform[0]
231 var opts = transform[1] || {}
232 return opts.post && { name: name, opts: opts, base: path.dirname(rootFile) }
233 })
234 .filter(Boolean)
235 .concat(sharedPosts)
236 .map(function (tr) {
237 if (typeof tr.name === "function") {
238 tr.tr = tr.name
239 } else {
240 var target = resolve.sync(tr.name, { basedir: tr.base || mdir })
241 tr.tr = require(target)
242 }
243 return tr
244 })
245
246 gdeps.prototype.applyTransforms(rootFile, source, localPosts, done);
247 }
248}
249
250function isRequirePath (node) {

Callers 2

tagexprFunction · 0.85
ondepsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…