includejs

2019-10-09

Resource Loader

IncludeJS

The Resource Loader for Browsers and NodeJSwith AMDand CommonJSsupport.

Build StatusNPM versionBower version

Features:

  • Loads any content: scripts, styles, ajax

  • Development friendly: incremental builds are not required

  • ES6 Imports

  • Production: Build the application into single html, js and css @see the app-bundler

  • Inline Dependency Declaration

    No external files, such as package.json or config.js

  • Load any javascript

  • No prerequests for module declaration. But supports also CommonJSand include.exports

  • Namespaced routing

    include
          .routes({ controller: '/src/controllers/{0}.js' }); 
          //... 
      include
          .js({controller: 'user' });
  • Parameterized include

    // foo.js
      include.js({ compo: 'baz?color=green' });
    
      // baz.js
      document.body.style.backgroundColor = include.iparams.color
  • Javascript Aliases

    include.js('myScript.js::Logger').done(function(response){
          response.Logger.logMe();
      });    
  • Custom Loader Support

  • Lazy Modules

    Scripts will be evaluated only when you needs them

  • Pause resource loading

    // pause current module
      var resume = include.pause();
    
      someAsyncJob(function(){
          // resume with exports example
          resume({ baz: 'quux' });
      })

:copyright: 2014 Atma.js Project

HomePage

http://atmajs.com/include

Repository

https://github.com/tenbits/IncludeJS.git


上一篇:infuse
下一篇:concolor
相关教程
关注微信

扫码加入 JavaScript 社区

相关文章
暂无相关文章

首次访问,需要验证
微信扫码,关注即可
(仅需验证一次)

欢迎加入 JavaScript 社区

号内回复关键字:

回到顶部