Example plugin generated using the canjs-plugin Yeoman generator.
-
Install using bower:
$ bower install canjs-hello-world
This plugin requires CanJS and can be used with any AMD compliant loader like AMD or Steal. It can also be used stand alone without any loader.
Simply include CanJS and a DOM manipulation library, jQuery in this case, and the plugin in your HTML:
<!-- Dependencies. -->
<script src="path/to/jquery.js"></script>
<script src="path/to/canjs.jquery.js"></script>
<!-- canjs-hello-world -->
<script src="path/to/canjs-hello-world.js"></script>
define(['can', 'path/to/canjs-hello-world'], function(can){
...
});
steal('can', 'path/to/canjs-hello-world', function(can){
...
});
This plugin was built with generator-canjs-plugin.