Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: api examples to es6 #67

Merged
merged 5 commits into from
May 28, 2021
Merged

chore: api examples to es6 #67

merged 5 commits into from
May 28, 2021

Conversation

jajugoguma
Copy link
Contributor

Please check if the PR fulfills these requirements

  • It's submitted to right branch according to our branching model
  • It's right issue type on title
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • It does not introduce a breaking change or has description for the breaking change

Description

  • Change examples in api document(jsdoc) and README to ES6
  • Prettier table of contents in README

Thank you for your contribution to TOAST UI product. 🎉 😘 ✨

Copy link

@lja1018 lja1018 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리뷰완료합니다.

array/zip.js Outdated
*
* var result = zip([1, 2, 3], ['a', 'b','c'], [true, false, true]);
* const result = zip([1, 2, 3], ['a', 'b','c'], [true, false, true]);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'a', 'b' 부분 띄어쓰기 하나 없어도 될것 같습니다.

*
* var model;
* let model;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아래에서 바로 const model = new Model();로 수정해도 될것 같아요.

* var name = 'global';
* var repository = {name: 'CodeSnippet'};
* const name = 'global';
* const repository = {name: 'CodeSnippet'};
* on(div, 'drag', function() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

화살표함수 사용해도 될 것 같아요.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on에 인자로 전달되는 콜백함수는 뒤 따른 인자인 repository를 바인딩해서 사용하는 구조로 작성되어 있습니다.
따라서 화살표 함수로 변경하면 이를 바인딩 할 수 없어서 오류가 발생하게 됩니다.

array/range.js Outdated
@@ -15,7 +15,8 @@ var isUndefined = require('../type/isUndefined');
* @returns {Array}
* @memberof module:array
* @example
* var range = require('tui-code-snippet/array/range'); // node, commonjs
* import range from 'tui-code-snippet/array/range'; // ES6
* // const range = require('tui-code-snippet/array/range'); // CommonJS

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

주석표시 필요없을것같습니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이미 ES6로 변경되어 있는 문서들을 참고 해서 작업했습니다!
https://nhn.github.io/tui.date-picker/latest/Calendar

DatePicker가 적용되어 있는 문서인데, 여기서 주석을 이용해 작성해서 이 형태를 따라 갔습니다.

[공통]
주석처리는 제거하고 브라우저 환경에 대한 명시를 추가하도록 하겠습니다!

Copy link

@jungeun-cho jungeun-cho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[공통] ES6, CommonJS 작성할 때 CommonJS부분을 주석처리한 이유가있을까요?
예제부분이라 주석처리안해도될것같아서요.

@jajugoguma jajugoguma merged commit 882221b into master May 28, 2021
@jajugoguma jajugoguma deleted the fix/api-examples-to-es6 branch May 28, 2021 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants