git clone git@gist.github.com:2f205baa3ced672c1d9146deac297f4c.git issue36
cd issue36
yarn install
npm start
# > babel-node runner
#
# person1: { smile: [Function: smile],
# greet: [Function: greet],
# default: [Circular] }
# person2: { smile: [Function: smile],
# greet: [Function: greet],
# default: [Circular] }
# person3: { smile: [Function: smile],
# greet: [Function: greet],
# default: [Circular] }
Last active
June 25, 2018 17:25
-
-
Save 59naga/2f205baa3ced672c1d9146deac297f4c to your computer and use it in GitHub Desktop.
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
Show hidden characters
{ | |
"presets": [ | |
"env" | |
], | |
"plugins": [ | |
["add-module-exports", {"addDefaultProperty": true}] | |
] | |
} |
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
--- | |
extends: airbnb |
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
import * as person from './person'; | |
export default person; |
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": "36", | |
"version": "1.0.0", | |
"main": "index.js", | |
"license": "MIT", | |
"scripts": { | |
"start": "babel-node runner" | |
}, | |
"devDependencies": { | |
"babel-cli": "^6.26.0", | |
"babel-core": "^6.26.3", | |
"babel-plugin-add-module-exports": "^0.3.0-pre", | |
"babel-preset-env": "^1.7.0", | |
"eslint": "^4.0.0", | |
"eslint-config-airbnb": "^17.0.0", | |
"eslint-plugin-import": "^2.13.0", | |
"eslint-plugin-jsx-a11y": "^6.0.3", | |
"eslint-plugin-react": "^7.10.0" | |
} | |
} |
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
export const smile = () => { | |
console.log(":)"); | |
}; | |
export const greet = () => { | |
console.log("hello"); | |
}; |
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
import person1 from './'; | |
var person2 = require('./'); | |
import * as person3 from './person'; | |
console.log("person1:", person1); | |
console.log("person2:", person2); | |
console.log("person3:", person3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment