├── .gitignore ├── LICENSE ├── README.md ├── angular-riot.js └── bower.json /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by https://www.gitignore.io 2 | 3 | ### Node ### 4 | # Logs 5 | logs 6 | *.log 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | 13 | # Directory for instrumented libs generated by jscoverage/JSCover 14 | lib-cov 15 | 16 | # Coverage directory used by tools like istanbul 17 | coverage 18 | 19 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 20 | .grunt 21 | 22 | # node-waf configuration 23 | .lock-wscript 24 | 25 | # Compiled binary addons (http://nodejs.org/api/addons.html) 26 | build/Release 27 | 28 | # Dependency directory 29 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- 30 | node_modules 31 | 32 | # Debug log from npm 33 | npm-debug.log 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Lucas Pereira Brígida 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## riot.js module for angularjs - DEPRECATED 2 | 3 | ![riotjs](https://muut.com/riotjs/logo/riot240x.png) ![angular](https://angularjs.org/img/AngularJS-large.png) 4 | 5 | ![bower](https://img.shields.io/bower/v/angular-riot.svg) [![Gitter chat](https://badges.gitter.im/lucasbrigida/angular-riot.png)](https://gitter.im/lucasbrigida/angular-riot) [![Hit Counter](http://hits.dwyl.io/lucasbrigida/angular-riot.svg)](http://hits.dwyl.io/lucasbrigida/angular-riot.svg) 6 | 7 | Description 8 | ========= 9 | Today, you can use Angular + React with **[ng-react](https://github.com/davidchang/ngReact)** but I think isn't friendly enough. 10 | 11 | Angular-Riot is a module for expose riot under angular, because: 12 | - Can use only riot for rendering. 13 | - Get more performance in your app. 14 | - Eliminate warnings if you using jshint. 15 | - Create reactive views without pain. 16 | 17 | Benefits 18 | ======= 19 | Reduce the number of $$watchers inside Angular to improve the $digest cycle’s performance, beyond get all the benefits of using [riot](https://muut.com/riotjs). 20 | 21 | > I'm using in a old project and decreased the time rendering in seconds to mileseconds. 22 | 23 | 24 | ### Prerequisites 25 | You need the **riot** installed, if you not have in your project, run command below: 26 | ``` sh 27 | $ bower install riot --save 28 | ``` 29 | ### Install 30 | ``` sh 31 | $ bower install angular-riot --save 32 | ``` 33 | Don't know **RIOT** [learn more](https://muut.com/riotjs/). 34 | 35 | ### Uninstall 36 | ``` bash 37 | $ bower uninstall angular-riot --save 38 | ``` 39 | ### How use 40 | Foolow [these instructions](https://muut.com/riotjs/guide/) and create similar code, 41 | ``` javascript 42 | angular.module('moduleName', ['angular-riot']) 43 | .controller('ctrlName', ['$scope', $document, 'riot', function ($scope, $document, riot) { 44 | $document.ready(function () { 45 | riot.mount('todo', { 46 | title: 'I want to behave!', 47 | items: [ 48 | { title: 'Avoid excessive coffeine', done: true }, 49 | { title: 'Hidden item', hidden: true }, 50 | { title: 'Be less provocative' }, 51 | { title: 'Be nice to people' } 52 | ] 53 | }); 54 | }); 55 | }]); 56 | ``` 57 | ### Version 58 | 0.0.1 59 | 60 | ### Todo's 61 | 62 | - Coming soon 63 | 64 | License 65 | ---- 66 | 67 | MIT 68 | 69 | 70 | **Free Software, Hell Yeah!** 71 | -------------------------------------------------------------------------------- /angular-riot.js: -------------------------------------------------------------------------------- 1 | /* 2 | ng-riot 3 | @author: lucasbrigida 4 | @description: riot module for angular 5 | */ 6 | 7 | angular.module('angular-riot', []) 8 | .factory('riot', ['$window', '$log', 9 | function ($window, $log) { 10 | 11 | //Check dependency 12 | if (!$window.riot) { 13 | return $log.error('Riot not installed, install package run: "bower install riot -g", More information: https://muut.com/riotjs/download.html'); 14 | } 15 | 16 | return $window.riot; 17 | }]) 18 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-riot", 3 | "version": "0.0.1", 4 | "main": "angular-riot.js", 5 | "authors": [ 6 | "lucasbrigida " 7 | ], 8 | "repository": { 9 | "type": "git", 10 | "url": "https://github.com/lucasbrigida/angular-riot.git" 11 | }, 12 | "description": "riot.js module for angular", 13 | "keywords": [ 14 | "riot", 15 | "angular" 16 | ], 17 | "license": "MIT", 18 | "ignore": [ 19 | "**/.*", 20 | "node_modules", 21 | "bower_components", 22 | "client/bower_components", 23 | "test", 24 | "tests" 25 | ] 26 | } 27 | --------------------------------------------------------------------------------