Just released a little website explaining new JS modules http://jsmodules.io (+ how they compare to Node modules http://jsmodules.io/cjs )
@domenic In node, the syntax for named import is require("mkdirp").sync. In JS.next modules, it's import { sync } from "mkdirp".
-
-
@wycats Yes, I agree. Are you saying you should not show the example? -
@domenic I will add the consumption example. I am disagreeing that JS.next modules change the amount of knowledge you need to have to use. -
@wycats They definitely do in that you need to know both `import * as x` and `import x`. Will open issue discussing. -
@domenic In Node, you need to know exactly the same before actually using. You need to understand the exact same usage patterns. -
@wycats Untrue. You do `x = require("x")` in both cases, without needing to understand. -
@domenic You have to understand before *using*. In both cases you have a mental model of: named, default or both. In both, usage is diff.
End of conversation
New conversation -
-
-
-
@kidkarolis@domenic you can import into the mkdirp namespace or rename for clarity. It works :) -
New conversation -
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.