From e701e2d4453383f288c30a33fa782c126f10d9d9 Mon Sep 17 00:00:00 2001 From: Aaron Gloege Date: Tue, 30 Dec 2014 16:33:30 -0600 Subject: [PATCH] Add `config.onJsProcessComplete` to a JS build immediately before it is optimized. --- build/jslib/optimize.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/jslib/optimize.js b/build/jslib/optimize.js index c7b23454..7ba5c0a2 100644 --- a/build/jslib/optimize.js +++ b/build/jslib/optimize.js @@ -228,6 +228,10 @@ function (lang, logger, envOptimize, file, parse, //Apply pragmas/namespace renaming fileContents = pragma.process(fileName, fileContents, config, 'OnSave', pluginCollector); + if (config.onJsProcessComplete) { + fileContents = config.onJsProcessComplete(fileContents, fileName); + } + //Optimize the JS files if asked. if (optimizerName && optimizerName !== 'none') { optFunc = envOptimize[optimizerName] || optimize.optimizers[optimizerName];