JSPM

  • Created
  • Published
  • Downloads 7725
  • Score
    100M100P100Q126138F

compose observables

Package Exports

  • can-compute
  • can-compute/can-compute_test
  • can-compute/proto-compute

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (can-compute) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

can-compute

Build Status

compose observables

Usage

ES6 use

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

import plugin from 'can-compute';

CommonJS use

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

var plugin = require("can-compute");

AMD use

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

Standalone use

Load the global version of the plugin:

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

Contributing

Making a Build

To make a build of the distributables into dist/ in the cloned repository run

npm install
node build

Running the tests

Tests can run in the browser by opening a webserver and visiting the test.html page. Automated tests that run the tests from the command line in Firefox can be run with

npm test