1.0.4 • Published 8 years ago

web-module v1.0.4

Weekly downloads
6
License
ISC
Repository
-
Last release
8 years ago

web-module

Inlementation of module pattern for loading the content dynamically on web site.

Usage

Include

<script src="node_modules/web-module/web-module.js"></script>

Define module

module.define('module-name', (function(){

  // Return something
})());

Get module

const func = module.require('module-name');

// Do something with func

Built-in modules

load

Load html, javascript, css content dynamically.

Example:

const load = module.require('load');

load('html-url')
.then((html)=>{
  // Do something with html
})
.load('script-url')
.then(()=>{
  // Do something after loading script
})
.load('style.css');

Bugs or feature requests

Please contact to email

License

ISC

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago