Today most people include bundle.js into their html:
<!-- index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
javascript first| var q = require('q'); | |
| doSomething().then(function(result) { | |
| console.log('i am done', result); | |
| }); | |
| function doSomething() { | |
| return q.nfcall(ldap, 'jeff'); | |
| } |
| document.onload = function () { | |
| require('typeahead.an'); // we are going to use typeahead in this demo | |
| require('an').controller(DemoCtrl); | |
| var module = require('an').flush(); // flush and bootstrap angular app | |
| angular.bootstrap(document.body, [module.name]); | |
| function DemoCtrl($scope, $http) { | |
| $scope.getLocation = function(val) { | |
| return $http.get('http://maps.googleapis.com/maps/api/geocode/json', { |
| var Benchmark = require('benchmark'); | |
| var suite = new Benchmark.Suite; | |
| var totalPropertiesOnObjectWithProto = 0; | |
| var totalPropertiesOnObjectWithoutProto = 0; | |
| var hasPrototype = {}; | |
| addStuff(hasPrototype); | |
| var noPrototype = Object.create(null); |
| var graph = require('ngraph.generators').noLinks(142); | |
| graph.forEachNode(assignNiceColor); | |
| var svg = require('ngraph.vivasvg')(graph); | |
| svg.nodeTemplate("<circle r='5' fill='{{node.color}}'></circle>"); | |
| svg.linkTemplate("<arrow></arrow>'"); | |
| svg.run(); | |
| function assignNiceColor(node) { | |
| var niceColors = ['#1f77b4', '#aec7e8', '#ff7f0e', '#ffbb78', '#2ca02c', '#98df8a', '#d62728', '#ff9896', '#9467bd', '#c5b0d5', '#8c564b', '#c49c94', '#e377c2', '#f7b6d2', '#7f7f7f', '#c7c7c7', '#bcbd22', '#dbdb8d', '#17becf', '#9edae5']; |
| var graph = require('ngraph.generators').grid(10, 10); | |
| var svg = require('ngraph.vivasvg')(graph); | |
| svg.nodeTemplate(["<text y='-5'>{{id}}</text>", | |
| "<circle r='5' fill='#00BFFF'></circle>"].join('\n')); | |
| svg.linkTemplate("<arrow stroke='#D3D3D3' from='{{pos.from}}' to='{{pos.to}}' offset='8'></arrow>'"); | |
| svg.run(); |
| // engine is injected into layout: | |
| var layout = forceBasedLayout(engine); | |
| // Modify global gravity force: | |
| engine.gravity(9.8); | |
| // Modify drag coefficient: | |
| engine.drag(0.1); | |
| // ... you can also chain code above | |
| // engine.gravity(9.8).drag(0.1); |
| // How to get all nodes? | |
| traverse(graph) | |
| .nodes() | |
| .forEach(function(node) { | |
| // node is here | |
| }); | |
| // how to get all neighbors of startNodeId? | |
| var grandChildren = traverse(graph) | |
| .nodes() |
| ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ | |
| ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ | |
| ๐ ๐ก ๐ข ๐ฃ ๐ค ๐ฅ ๐ฆ ๐ง ๐จ ๐ฉ ๐ช ๐ซ ๐ฌ ๐ญ ๐ฎ ๐ฏ | |
| ๐ฐ ๐ฑ ๐ฒ ๐ณ ๐ด ๐ต ๐ถ ๐ท ๐ธ ๐น ๐บ ๐ป ๐ผ ๐ฝ ๐พ ๐ฟ | |
| ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ | |
| ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ | |
| ๐ ๐ก ๐ข ๐ฃ ๐ค ๐ฅ ๐ฆ ๐ง ๐จ ๐ฉ ๐ช ๐ซ ๐ฌ ๐ญ ๐ฎ ๐ฏ | |
| ๐ฐ ๐ฑ ๐ฒ ๐ณ ๐ด ๐ต ๐ถ ๐ท ๐ธ ๐น ๐บ ๐ป ๐ผ ๐ฝ ๐พ ๐ฟ | |
| ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ | |
| ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ |
https://github.com/airblade/vim-gitgutter Shared Stars: x261 | 17% Stars: 1,670 Forks: 54 A Vim plugin which shows a git diff in the gutter (sign column).
https://github.com/Valloric/YouCompleteMe: Shared Stars: x259 | 16% Stars: 1,849 Forks: 158 A code-completion engine for Vim
https://github.com/FredKSchott/CoVim: Shared Stars: x202 | 15% Stars: 1,335 Forks: 40 Collaborative Editing for Vim