Guest User

Untitled

a guest
Jul 15th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. function GasPlugin() {};
  2.  
  3. GasPlugin.prototype.apply = function(compiler) {
  4. compiler.hooks.emit.tap('GasPlugin', function(compilation) {
  5. var gasify = 'function main() {}'
  6. + ' /* Google App Script endpoint */\n'
  7. + compilation.assets['main.js'].source();
  8.  
  9. compilation.assets['main.js'] = {
  10. source: function() {
  11. return gasify;
  12. },
  13. size: function() {
  14. return gasify.size;
  15. }
  16. }
  17. });
  18. };
  19.  
  20. module.exports = GasPlugin;
Add Comment
Please, Sign In to add comment