With StealJS, you can import this module directly in a template that is autorendered:
import plugin from 'steal-each-module-dest-function';
Use require
to load steal-each-module-dest-function
and everything else
needed to create a template that uses steal-each-module-dest-function
:
var plugin = require("steal-each-module-dest-function");
Configure the can
and jquery
paths and the steal-each-module-dest-function
package:
<script src="require.js"></script>
<script>
require.config({
paths: {
"jquery": "node_modules/jquery/dist/jquery",
"can": "node_modules/canjs/dist/amd/can"
},
packages: [{
name: 'steal-each-module-dest-function',
location: 'node_modules/steal-each-module-dest-function/dist/amd',
main: 'lib/steal-each-module-dest-function'
}]
});
require(["main-amd"], function(){});
</script>
Load the global
version of the plugin:
<script src='./node_modules/steal-each-module-dest-function/dist/global/steal-each-module-dest-function.js'></script>
To make a build of the distributables into dist/
in the cloned repository run
npm install
node build