├── docs ├── CNAME ├── fonts │ ├── proxima-nova │ │ ├── ProximaNova-Light-webfont.eot │ │ ├── ProximaNova-Reg-webfont.eot │ │ ├── ProximaNova-Reg-webfont.ttf │ │ ├── ProximaNova-Black-webfont.eot │ │ ├── ProximaNova-Black-webfont.ttf │ │ ├── ProximaNova-Black-webfont.woff │ │ ├── ProximaNova-Bold-webfont.eot │ │ ├── ProximaNova-Bold-webfont.ttf │ │ ├── ProximaNova-Bold-webfont.woff │ │ ├── ProximaNova-BoldIt-webfont.eot │ │ ├── ProximaNova-BoldIt-webfont.ttf │ │ ├── ProximaNova-Light-webfont.ttf │ │ ├── ProximaNova-Light-webfont.woff │ │ ├── ProximaNova-Reg-webfont.woff │ │ ├── ProximaNova-RegIt-webfont.eot │ │ ├── ProximaNova-RegIt-webfont.ttf │ │ ├── ProximaNova-RegIt-webfont.woff │ │ ├── ProximaNova-Sbold-webfont.eot │ │ ├── ProximaNova-Sbold-webfont.ttf │ │ ├── ProximaNova-Sbold-webfont.woff │ │ ├── ProximaNova-Thin-webfont.eot │ │ ├── ProximaNova-Thin-webfont.ttf │ │ ├── ProximaNova-Thin-webfont.woff │ │ ├── ProximaNova-ThinIt-webfont.eot │ │ ├── ProximaNova-ThinIt-webfont.ttf │ │ ├── ProximaNova-Xbold-webfont.eot │ │ ├── ProximaNova-Xbold-webfont.ttf │ │ ├── ProximaNova-Xbold-webfont.woff │ │ ├── ProximaNova-BlackIt-webfont.eot │ │ ├── ProximaNova-BlackIt-webfont.ttf │ │ ├── ProximaNova-BlackIt-webfont.woff │ │ ├── ProximaNova-BoldIt-webfont.woff │ │ ├── ProximaNova-LightIt-webfont.eot │ │ ├── ProximaNova-LightIt-webfont.ttf │ │ ├── ProximaNova-LightIt-webfont.woff │ │ ├── ProximaNova-SboldIt-webfont.eot │ │ ├── ProximaNova-SboldIt-webfont.ttf │ │ ├── ProximaNova-SboldIt-webfont.woff │ │ ├── ProximaNova-ThinIt-webfont.woff │ │ ├── ProximaNova-XboldIt-webfont.eot │ │ ├── ProximaNova-XboldIt-webfont.ttf │ │ └── ProximaNova-XboldIt-webfont.woff │ ├── entypo │ │ ├── entypo.eot │ │ ├── entypo.ttf │ │ ├── entypo.woff │ │ └── entypo.svg │ └── entypo-social │ │ ├── entypo-social.eot │ │ ├── entypo-social.ttf │ │ ├── entypo-social.woff │ │ └── entypo-social.svg ├── img │ ├── kin.png │ ├── vs.png │ ├── dell.png │ ├── disco.png │ ├── mikeric.jpg │ └── attendease.png ├── docs │ ├── reference │ │ ├── _binders │ │ │ ├── html.md │ │ │ ├── show.md │ │ │ ├── hide.md │ │ │ ├── enabled.md │ │ │ ├── disabled.md │ │ │ ├── value.md │ │ │ ├── text.md │ │ │ ├── unless.md │ │ │ ├── if.md │ │ │ ├── class-[classname].md │ │ │ ├── [attribute].md │ │ │ ├── checked.md │ │ │ ├── unchecked.md │ │ │ ├── on-[event].md │ │ │ └── each-[item].md │ │ ├── _data.json │ │ └── index.jade │ └── guide │ │ ├── _sections │ │ ├── formatters.md │ │ ├── adapters │ │ │ ├── default.md │ │ │ └── creating.md │ │ ├── usage │ │ │ ├── binding.md │ │ │ ├── configuring.md │ │ │ └── templates.md │ │ ├── iteration │ │ │ ├── iteration.md │ │ │ └── index.md │ │ ├── functions-call.md │ │ ├── binders.md │ │ ├── formatters │ │ │ ├── one-way.md │ │ │ ├── arguments.md │ │ │ └── two-way.md │ │ ├── binders │ │ │ ├── one-way.md │ │ │ ├── two-way.md │ │ │ └── api.md │ │ ├── index.md │ │ ├── computed-properties.md │ │ ├── install.md │ │ ├── adapters.md │ │ └── components.md │ │ ├── index.jade │ │ └── _data.json ├── js │ ├── app.js │ └── highlight.js ├── css │ ├── responsive.styl │ ├── syntax.css │ ├── type.css │ └── screen.styl ├── _layout.jade └── index.jade ├── .gitignore ├── src ├── formatters.coffee ├── export.coffee ├── util.coffee ├── parsers.coffee ├── rivets.coffee ├── adapter.coffee ├── view.coffee ├── binders.coffee └── bindings.coffee ├── component.json ├── bower.json ├── spec ├── rivets │ ├── formatters.js │ ├── text_template_parser.js │ ├── component_binding.js │ ├── functional.js │ ├── binders.js │ ├── routines.js │ └── binding.js ├── runner.html └── lib │ └── mock.data.js ├── LICENSE ├── package.json ├── doc.sh ├── gulpfile.js ├── README.md ├── CHANGELOG.md └── dist └── rivets.min.js /docs/CNAME: -------------------------------------------------------------------------------- 1 | rivetsjs.com 2 | -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-Light-webfont.eot: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.swp 3 | node_modules/**/* 4 | -------------------------------------------------------------------------------- /docs/img/kin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/img/kin.png -------------------------------------------------------------------------------- /docs/img/vs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/img/vs.png -------------------------------------------------------------------------------- /docs/img/dell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/img/dell.png -------------------------------------------------------------------------------- /docs/img/disco.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/img/disco.png -------------------------------------------------------------------------------- /docs/img/mikeric.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/img/mikeric.jpg -------------------------------------------------------------------------------- /docs/img/attendease.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/img/attendease.png -------------------------------------------------------------------------------- /docs/fonts/entypo/entypo.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/entypo/entypo.eot -------------------------------------------------------------------------------- /docs/fonts/entypo/entypo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/entypo/entypo.ttf -------------------------------------------------------------------------------- /docs/fonts/entypo/entypo.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/entypo/entypo.woff -------------------------------------------------------------------------------- /docs/fonts/entypo-social/entypo-social.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/entypo-social/entypo-social.eot -------------------------------------------------------------------------------- /docs/fonts/entypo-social/entypo-social.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/entypo-social/entypo-social.ttf -------------------------------------------------------------------------------- /docs/fonts/entypo-social/entypo-social.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/entypo-social/entypo-social.woff -------------------------------------------------------------------------------- /docs/docs/reference/_binders/html.md: -------------------------------------------------------------------------------- 1 | Sets the element's HTML content. 2 | 3 | ```html 4 | 5 | ``` 6 | -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-Reg-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-Reg-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-Reg-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-Reg-webfont.ttf -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-Black-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-Black-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-Black-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-Black-webfont.ttf -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-Black-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-Black-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-Bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-Bold-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-Bold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-Bold-webfont.ttf -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-Bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-Bold-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-BoldIt-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-BoldIt-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-BoldIt-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-BoldIt-webfont.ttf -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-Light-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-Light-webfont.ttf -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-Light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-Light-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-Reg-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-Reg-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-RegIt-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-RegIt-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-RegIt-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-RegIt-webfont.ttf -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-RegIt-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-RegIt-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-Sbold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-Sbold-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-Sbold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-Sbold-webfont.ttf -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-Sbold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-Sbold-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-Thin-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-Thin-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-Thin-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-Thin-webfont.ttf -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-Thin-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-Thin-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-ThinIt-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-ThinIt-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-ThinIt-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-ThinIt-webfont.ttf -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-Xbold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-Xbold-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-Xbold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-Xbold-webfont.ttf -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-Xbold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-Xbold-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-BlackIt-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-BlackIt-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-BlackIt-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-BlackIt-webfont.ttf -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-BlackIt-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-BlackIt-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-BoldIt-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-BoldIt-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-LightIt-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-LightIt-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-LightIt-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-LightIt-webfont.ttf -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-LightIt-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-LightIt-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-SboldIt-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-SboldIt-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-SboldIt-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-SboldIt-webfont.ttf -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-SboldIt-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-SboldIt-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-ThinIt-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-ThinIt-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-XboldIt-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-XboldIt-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-XboldIt-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-XboldIt-webfont.ttf -------------------------------------------------------------------------------- /docs/fonts/proxima-nova/ProximaNova-XboldIt-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikeric/rivets/HEAD/docs/fonts/proxima-nova/ProximaNova-XboldIt-webfont.woff -------------------------------------------------------------------------------- /src/formatters.coffee: -------------------------------------------------------------------------------- 1 | # Core formatters 2 | 3 | # Calls a function with arguments 4 | Rivets.public.formatters['call'] = (value, args...) -> 5 | value.call @, args... 6 | 7 | -------------------------------------------------------------------------------- /docs/docs/reference/_binders/show.md: -------------------------------------------------------------------------------- 1 | Shows the element when the value evaluates to true and hides the element when the value evaluates to false. 2 | 3 | ```html 4 | 5 | ``` 6 | -------------------------------------------------------------------------------- /docs/docs/reference/_binders/hide.md: -------------------------------------------------------------------------------- 1 | Hides the element when the value evaluates to true and shows the element when the value evaluates to false. 2 | 3 | ```html 4 | 5 | ``` 6 | -------------------------------------------------------------------------------- /docs/docs/reference/_binders/enabled.md: -------------------------------------------------------------------------------- 1 | Enables the element when the value evaluates to true and disables the element when the value evaluates to false. 2 | 3 | ```html 4 | 5 | ``` 6 | -------------------------------------------------------------------------------- /docs/docs/reference/_binders/disabled.md: -------------------------------------------------------------------------------- 1 | Disables the element when the value evaluates to true and enables the element when the value evaluates to false. 2 | 3 | ```html 4 | 5 | ``` 6 | -------------------------------------------------------------------------------- /docs/docs/reference/_binders/value.md: -------------------------------------------------------------------------------- 1 | Sets the element's value when the attribute changes and sets the bound object's value when the input element changes from user input (two-way). 2 | 3 | ```html 4 | 5 | ``` 6 | -------------------------------------------------------------------------------- /docs/docs/reference/_binders/text.md: -------------------------------------------------------------------------------- 1 | Sets the element's text content. 2 | 3 | ```html 4 |
5 | ``` 6 | 7 | You can also bind text using interpolation. 8 | 9 | ```html 10 |{ user.name } is { user.age } years old.
11 | ``` 12 | -------------------------------------------------------------------------------- /docs/docs/reference/_binders/unless.md: -------------------------------------------------------------------------------- 1 | Removes and unbinds the element as well as it's child nodes when the value evaluates to true and inserts / binds the element when the value evaluates to false. 2 | 3 | ```html 4 | 5 | ``` 6 | -------------------------------------------------------------------------------- /docs/docs/reference/_binders/if.md: -------------------------------------------------------------------------------- 1 | Inserts and binds the element as well as it's child nodes into the DOM when the value evaluates to true and removes / unbinds the element when the value evaluates to false. 2 | 3 | ```html 4 | 5 | ``` 6 | -------------------------------------------------------------------------------- /docs/docs/reference/_binders/class-[classname].md: -------------------------------------------------------------------------------- 1 | Adds a class (whatever value is in place of `[classname]`) on the element when the value evaluates to true and removes that class if the value evaluates to false. 2 | 3 | ```html 4 |Current bid: { auction.currentBid | money }
7 | 8 | 11 |Current bid: { auction.currentBid | money }
11 | 12 | 15 |