made with esnextbin
Last active
January 26, 2019 19:59
-
-
Save amilajack/d1def1e9669bbfde2592b117247d0390 to your computer and use it in GitHub Desktop.
esnextbin sketch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>ESNextbin Sketch</title> | |
<!-- put additional styles and scripts here --> | |
</head> | |
<body> | |
<!-- put markup and other contents here --> | |
<img src="" alt=""> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const toposort = require('toposort') | |
const graph = [ | |
// From // To | |
// ['ro', 'tie your shoes'], | |
['babel', 'rollup'], | |
['eslint', 'babel'], | |
['redux', 'babel'], | |
['react', 'babel'] | |
] | |
// Now, sort the vertices topologically, to reveal a legal execution order. | |
console.log(toposort(graph)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "esnextbin-sketch", | |
"version": "0.0.0", | |
"dependencies": { | |
"toposort": "2.0.2" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var toposort = require('toposort'); | |
var graph = [ | |
// From // To | |
// ['ro', 'tie your shoes'], | |
['babel', 'rollup'], ['eslint', 'babel'], ['redux', 'babel'], ['react', 'babel']]; | |
// Now, sort the vertices topologically, to reveal a legal execution order. | |
console.log(toposort(graph)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment