Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : Systemjs plugin with instantiate without inclusion in build

$
0
0
Well how would you like me to give you an example?

Actually to get this you can create any sytem.js type plugin example some.js:

  1. exports.instantiate = function(load) {
  2.     load.metadata.deps = [];

  3.     load.metadata.execute = function(){

  4.         if(load.source) {
  5.             /// some action here
  6.         }
  7.         return System.newModule({});
  8.     };
  9.     load.metadata.format = "some";
  10. }

Import file using this plugin. 

  1. require('somefile.txt!some')

And try to build.

Viewing all articles
Browse latest Browse all 3491

Trending Articles