https://github.com/canjs/can-todomvc
https://github.com/canjs/can-todomvc
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/canjs/can-todomvc
- Owner: canjs
- License: mit
- Created: 2016-04-28T13:22:07.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-06-13T23:19:42.000Z (about 6 years ago)
- Last Synced: 2025-01-06T14:27:18.206Z (6 months ago)
- Language: CSS
- Size: 20.5 KB
- Stars: 2
- Watchers: 12
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
- License: LICENSE.md
Awesome Lists containing this project
README
# can-todomvc
[](https://travis-ci.org/canjs/can-todomvc)
TodoMVC with CanJS 3.0
## Usage
### ES6 use
With StealJS, you can import this module directly in a template that is autorendered:
```js
import plugin from 'can-todomvc';
```### CommonJS use
Use `require` to load `can-todomvc` and everything else
needed to create a template that uses `can-todomvc`:```js
var plugin = require("can-todomvc");
```## AMD use
Configure the `can` and `jquery` paths and the `can-todomvc` package:
```html
require.config({
paths: {
"jquery": "node_modules/jquery/dist/jquery",
"can": "node_modules/canjs/dist/amd/can"
},
packages: [{
name: 'can-todomvc',
location: 'node_modules/can-todomvc/dist/amd',
main: 'lib/can-todomvc'
}]
});
require(["main-amd"], function(){});```
### Standalone use
Load the `global` version of the plugin:
```html
```
## 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
```