To run locally, make sure you have node installed and:
git clone https://gist.github.com/96fb0ae2904f86c86e66.git es6-modules
npm install -g babel
babel-node es6-modules
export function gar() { | |
console.log('bar.gar'); | |
} | |
export function zar() { | |
console.log('bar.zar'); | |
} | |
function hidden() { | |
console.log('no see me'); | |
} |
export default (g) => { | |
console.log('foo is fooing with ' + g); | |
}; | |
export const goo = 'foo.goo'; |
import foo, {goo} from './foo'; | |
import {zar as z} from './bar'; | |
import * as bar from './bar'; | |
if(bar.hidden) bar.hidden(); | |
foo(goo); | |
bar.gar(); | |
bar.zar(); | |
z(); |