What are the `ES6` modules and `CommonJS` modules?

Read Setting up ES6 | Leanpub What are the ES6 modules and CommonJS modules? This chapter examines how Babel ensures that code it transpiles interoperates properly with normal CommonJS modules. Consult chapter “Modules” in “Exploring ES6” for more information on ES6 modules. 7.1 ES6 modules vs. CommonJS modules 7.1.1 ECMAScript 6 modules Default export (single…

Read More

What is difference between `module.exports` and `export` in node.js?

ES Modules: Using Named Exports as the Default Export https://medium.com/@timoxley/named-exports-as-the-default-export-api-670b1b554f65 // in `cow.js` : export function speak () { return ‘moo’ } To use a named export, we can import it directly into our code: // in `import-named.js` : import { speak } from ‘./cow’; speak() // => ‘moo’ Aliasing named imports You can assign…

Read More

Git – Undoing Changes: git checkout git revert git reset git clean

Git Undoing Changes git checkout git revert git reset git clean https://www.atlassian.com/git/tutorials/undoing-changes Whereas reverting is designed to safely undo a public commit, git reset is designed to undo local changes. Because of their distinct goals, the two commands are implemented differently: resetting completely removes a changeset, whereas reverting maintains the original changeset and uses a…

Read More

Extract directory, filename, and extension in Bash shell

Extract directory, filename, and extension in Bash shell https://stackoverflow.com/questions/965053/extract-filename-and-extension-in-bash $> FILE_PATH=”dir/example.tar.gz” $> FILE=”example.tar.gz” $> dirname $FILE_PATH dir $> dirname $FILE . $> basename $FILE_PATH example.tar.gz $> basename $FILE example.tar.gz # ——————————- # dir/example.tar(.gz) : $> echo “${FILE_PATH%.*}” dir/example.tar # dir/example(.tar(.gz)) : $> echo “${FILE_PATH%%.*}” dir/example # example.tar(.gz) : $> echo “${FILE%.*}” example.tar # example(.tar(.gz)) :…

Read More

Using Babel 6 + grunt to work with ES6 – how to transform require statements?

Using Babel 6 + grunt to work with ES6 – how to transform require statements? https://stackoverflow.com/questions/41067220/using-babel-grunt-to-work-with-es6-how-to-transform-require-statements Browserify will handle the import bindings for the ES6 modules. Also a package named babelify will help to handle your babel browserify transform. The following seems to work well: Use babel-cli instead of babel. Step 1. It’s worth noting…

Read More

`bluebird@3.5.1`: MongoDB `mongoose@4.13.7` `Promises` library

bluebird@3.5.1: MongoDB mongoose@4.13.7 Promises library > Warning: a promise was created in a handler > at internal/process/next_tick.js:180:9 but was not returned from it, > see http://goo.gl/rRqMUw > at model.Query.ret [as execAsync] > (eval at makeNodePromisifiedEval > (/home/bike/github/SmartPlug-Foodtruck.kr/node_modules/bluebird/js/release/promisify.js:184:12), <anonymous>:8:21) > mongoose Promises : bluebird http://mongoosejs.com/docs/promises.html Built-in Promises Mongoose async operations, like .save() and queries, return Promises/A+…

Read More

`module.exports` vs. `export default` in Node.js and ES6

https://stackoverflow.com/questions/40294870/module-exports-vs-export-default-in-node-js-and-es6 module.exports vs. export default in Node.js and ES6 ES6 default exports are actually also named exports, except that default is a “reserved” name and there is special syntax support for it. Lets have a look how Babel compiles named and default exports: // input export const foo = 42; export default 21; // output…

Read More

modify `open-terminal-here` package for Elementary OS Atom Editor

Atom Editor Package: open-terminal-here Modify open-terminal-here for open elementary Terminal(io.elementary.terminal) in the current directory on Atom Editor of Elementary OS (Ubuntu base). Github usemodj/atom-open-terminal-here: https://github.com/usemodj/atom-open-terminal-here Open Terminal Here Open the Terminal (Mac OS X, Linux) or Command Prompt (Windows) in the given directory via context menu or keyboard shortcut. Ubuntu Linux Install xdotool: sudo apt-get…

Read More

책. 나의 문화유산 답사기 – 유홍준

유홍준 https://ko.m.wikipedia.org/wiki/%EC%9C%A0%ED%99%8D%EC%A4%80 대표작 : 나의 문화유산 답사기 저서편집 • 화인열전 1,2, 역사비평사, 2001년, ISBN 978-89-7696-016-0 • 완당평전 1~3 • 한국 미술사 강의 1 선사와 고대, 눌와 • 한국 미술사 강의 2 통일신라와 고려, 눌와 • 한국 미술사 강의 3 눌와 • 유홍준의 국보순례, 눌와 답사기 • 나의 문화유산답사기 1, 창비, 1993년, ISBN 978-89-364-7201-6 • 나의…

Read More

SNS 공감시인 하상욱 단편시집_서울 시

하상욱 – 위키백과, 우리 모두의 백과사전 https://ko.wikipedia.org › wiki › 하상욱 https://ko.m.wikipedia.org/wiki/하상욱 ‎ 하상욱(1981년 3월 21일 ~ )은 대한민국의 작가, 시인, 싱어송라이터이다. 2012년 발행한 시집 《서울 시》는 베스트셀러에 등극했다. SNS 공감시인 하상욱_서울 시 http://blog.daum.net/odor757/189 시팔이 하상욱 <어쩌더 어른> TvN 프로그램 하상욱 시인의 영업비밀 https://namu.wiki/w/하상욱 끝이 어딜까 너의 잠재력 _하상욱 단편 시집 ‘다 쓴 치약’ 중에서_…

Read More