Skip to content

Latest commit

 

History

History
48 lines (36 loc) · 1.02 KB

usage.md

File metadata and controls

48 lines (36 loc) · 1.02 KB

Usage

ES6 use

With StealJS, you can import this module directly in a template that is autorendered:

import plugin from "can-connect-feathers";

CommonJS use

Use require to load can-connect-feathers and everything else needed to create a template that uses can-connect-feathers:

import plugin from "can-connect-feathers";

AMD use

Configure the can and jquery paths and the can-connect-feathers 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: 'can-connect-feathers',
		    	location: 'node_modules/can-connect-feathers/dist/amd',
		    	main: 'lib/can-connect-feathers'
	    }]
	});
	require(["main-amd"], function(){});
</script>

Standalone use

Load the global version of the plugin:

<script src='./node_modules/can-connect-feathers/dist/global/can-connect-feathers.js'></script>