Skip to content

Commit c3dd265

Browse files
committed
feat: add CDN (#6)
* style: eslint, prettier * feat: add CDN * docs: update README.md * chore: apply code review * docs: update README and other documentations
1 parent e3643d4 commit c3dd265

26 files changed

+1836
-1813
lines changed

.eslintrc.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
module.exports = {
2-
"env": {
3-
"browser": true,
4-
"amd": true,
5-
"node": true,
6-
"jasmine": true,
7-
"jquery": true
2+
env: {
3+
amd: true,
4+
node: true,
5+
jasmine: true
86
},
9-
"globals": {
10-
"tui": true,
11-
"loadFixtures": true,
12-
"ActiveXObject": true
7+
globals: {
8+
tui: true
139
},
14-
"extends": "tui/es6"
10+
extends: ['tui/es6', 'plugin:prettier/recommended'],
11+
rules: {
12+
'no-console': 'off'
13+
}
1514
};

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"printWidth": 100,
3+
"singleQuote": true
4+
}

CODE_OF_CONDUCT.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
education, socio-economic status, nationality, personal appearance, race,
10+
religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at dl_javascript@nhn.com. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org

CONTRIBUTING.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Contributing to TOAST UI
2+
3+
First off, thanks for taking the time to contribute! 🎉 😘 ✨
4+
5+
The following is a set of guidelines for contributing to TOAST UI. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
6+
7+
## Reporting Bugs
8+
Bugs are tracked as GitHub issues. Search the list and try reproduce on [demo][demo] before you create an issue. When you create an issue, please provide the following information by filling in the template.
9+
10+
Explain the problem and include additional details to help maintainers reproduce the problem:
11+
12+
* **Use a clear and descriptive title** for the issue to identify the problem.
13+
* **Describe the exact steps which reproduce the problem** in as many details as possible. Don't just say what you did, but explain how you did it. For example, if you moved the cursor to the end of a line, explain if you used a mouse or a keyboard.
14+
* **Provide specific examples to demonstrate the steps.** Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets on the issue, use Markdown code blocks.
15+
* **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior.
16+
* **Explain which behavior you expected to see instead and why.**
17+
* **Include screenshots and animated GIFs** which show you following the described steps and clearly demonstrate the problem.
18+
19+
## Suggesting Enhancements
20+
In case you want to suggest for a TOAST UI product, please follow this guideline to help maintainers and the community understand your suggestion.
21+
Before creating suggestions, please check [issue list](../../../labels/feature%20request) if there's already a request.
22+
23+
Create an issue and provide the following information:
24+
25+
* **Use a clear and descriptive title** for the issue to identify the suggestion.
26+
* **Provide a step-by-step description of the suggested enhancement** in as many details as possible.
27+
* **Provide specific examples to demonstrate the steps.** Include copy/pasteable snippets which you use in those examples, as Markdown code blocks.
28+
* **Include screenshots and animated GIFs** which helps demonstrate the steps or point out the part of a TOAST UI product which the suggestion is related to.
29+
* **Explain why this enhancement would be useful** to most TOAST UI users.
30+
* **List some other products where this enhancement exists.**
31+
32+
## First Code Contribution
33+
34+
Unsure where to begin contributing to TOAST UI? You can start by looking through these `document`, `good first issue` and `help wanted` issues:
35+
36+
* **document issues**: issues which should be reviewed or improved.
37+
* **good first issues**: issues which should only require a few lines of code, and a test or two.
38+
* **help wanted issues**: issues which should be a bit more involved than beginner issues.
39+
40+
## Pull Requests
41+
42+
### Development WorkFlow
43+
- Set up your development environment
44+
- Make change from a right branch
45+
- Be sure the code passes `npm run test`
46+
- Make a pull request
47+
48+
### Development environment
49+
- Prepare your machine node and it's packages installed.
50+
- Checkout our repository
51+
- Install dependencies by `npm install && bower install`
52+
- Start webpack-dev-server by `npm run serve`
53+
54+
### Make changes
55+
#### Checkout a branch
56+
- **develop**: PR base branch. merge features, updates for next minor or major release
57+
- **master**: bug fix or document update for next patch release. develop branch will rebase every time master branch update. so keep code change to a minimum.
58+
- **production**: lastest release branch with distribution files. never make a PR on this
59+
- **gh-pages**: API docs, examples and demo
60+
61+
#### Check Code Style
62+
Run `npm run eslint` and make sure all the tests pass.
63+
64+
#### Test
65+
Run `npm run test` and verify all the tests pass.
66+
If you are adding new commands or features, they must include tests.
67+
If you are changing functionality, update the tests if you need to.
68+
69+
#### Commit
70+
Follow our [commit message conventions](./docs/COMMIT_MESSAGE_CONVENTION.md).
71+
72+
### Yes! Pull request
73+
Make your pull request, then describe your changes.
74+
#### Title
75+
Follow other PR title format on below.
76+
```
77+
<Type>: Short Description (fix #111)
78+
<Type>: Short Description (fix #123, #111, #122)
79+
<Type>: Short Description (ref #111)
80+
```
81+
* capitalize first letter of Type
82+
* use present tense: 'change' not 'changed' or 'changes'
83+
84+
#### Description
85+
If it has related to issues, add links to the issues(like `#123`) in the description.
86+
Fill in the [Pull Request Template](./docs/PULL_REQUEST_TEMPLATE.md) by check your case.
87+
88+
## Code of Conduct
89+
This project and everyone participating in it is governed by the [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to dl_javascript@nhn.com.
90+
91+
> This Guide is base on [atom contributing guide](https://github.com/atom/atom/blob/master/CONTRIBUTING.md), [CocoaPods](http://guides.cocoapods.org/contributing/contribute-to-cocoapods.html) and [ESLint](http://eslint.org/docs/developer-guide/contributing/pull-requests)

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License
22

3-
Copyright (c) 2017 NHN Entertainment Corp.
3+
Copyright (c) 2019 NHN Corp.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 117 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,143 @@
1-
# tui-release-notes
1+
# TOAST UI Tools: Release Notes
2+
> Github release notes generator.
23
3-
Gather commits on tag
4+
![image](https://user-images.githubusercontent.com/8615506/68182173-845baf80-ffdc-11e9-8c5d-52a3f4d26138.png)
45

5-
## Installation
6-
```json
6+
## 🚩 Table of Contents
7+
* [Features](#-features)
8+
* [Install](#-install)
9+
* [Usage](#-usage)
10+
* [Add a config file](#add-a-config-file)
11+
* [Pull Request Steps](#-pull-request-steps)
12+
* [Contributing](#-contributing)
13+
* [TOAST UI Family](#-toast-ui-family)
14+
* [License](#-license)
15+
16+
## 🎨 Features
17+
18+
* Create a release note from a tag.
19+
* Group commits by their types.
20+
* Add links to download.
21+
22+
## 💾 Install
23+
24+
```javascript
725
// package.json
826
devDependencies: {
9-
"tui-release-notes": "git+https://github.com/nhnent/tui.release-notes.git"
27+
"tui-release-notes": "git+https://github.com/nhn/tui.release-notes.git"
1028
}
1129
```
1230

13-
## Before Use
14-
1. Check `package.json` has `repository` property
15-
```json
16-
// package.json
31+
## 🔨 Usage
32+
33+
1. Check `package.json` has `repository` property. Repository url should end with `.git`.
34+
35+
```javascript
1736
"repository": {
1837
"type": "git",
1938
"url": "https://github.com/username/repository-name.git"
2039
}
40+
2141
// or for short expression
2242
"repository": "https://github.com/username/repository-name.git"
2343
```
2444

25-
2. Register `TUI_GITHUB_TOKEN` as a environment variables
45+
2. Register `TUI_GITHUB_TOKEN` as an environment variable or `token` property in `tui-note.config.js`.
2646

27-
3. Execute `tuie` on your `project root`
28-
```json
29-
// package.json
47+
```javascript
48+
// tui-note.config.js
49+
module.exports = {
50+
token: 'your-github-token-for-tui-release-notes'
51+
}
52+
```
53+
54+
3. Add the command as a script to the project's `package.json` file.
55+
56+
```javascript
3057
scripts: {
31-
"tuie": "tuie"
58+
"note": "tui-note"
3259
}
3360
```
3461

35-
## Usage
62+
4. Execute the command on your `project root`.
63+
3664
```bash
3765
# latest tag
38-
npm run tuie
66+
npm run note
3967
# specific tag
40-
npm run tuie --tag={specific-tag}
68+
npm run note -- --tag={specific-tag}
4169
# enterprise
42-
npm run tuie --apiUrl={github.your-enterprise-url.com/api/v3}
70+
npm run note -- --apiUrl={github.your-enterprise-url.com/api/v3}
71+
```
72+
73+
### Add a config file
74+
75+
Add your config files to the root of your working directory. The config file must be in the form of `tui-note.config.js`.
76+
77+
| Option | Type | Description |
78+
| --- | --- | --- |
79+
| `token` | `string` | Github access token for tui-release-note. If you pass a token as an environment variable, it will be overwritten. |
80+
| `tag` | `string` | Tag to create a release note. If you pass a tag as the command line argument, it will be overwritten. (default: the latest tag) |
81+
| `apiUrl` | `string` | Github API url. If you use the enterprise github, set your enterprise github url. (default: https://api.github.com) |
82+
| `groupBy` | `object` | Determine how to categorize commits by their types. 'key' is `group name` and 'value' is `array of types`. (default: [defaultConfig.groupBy](https://github.com/nhn/tui.release-notes/blob/master/src/defaultConfig.js#L9)) |
83+
| `commitMessage.type` | `function` | Determine how to get a type from a commit message. (default: [defaultConfig.commitMessage.type](https://github.com/nhn/tui.release-notes/blob/master/src/defaultConfig.js#L21)) |
84+
| `template.commit` | `function` | Note from a commit. (default: [defaultConfig.template.commit](https://github.com/nhn/tui.release-notes/blob/master/src/defaultConfig.js#L33)) |
85+
| `downloads` | `function \| object` | Links to download the files. (reference: [defaultConfig.downloads](https://github.com/nhn/tui.release-notes/blob/master/src/defaultConfig.js#L47)) |
86+
87+
88+
## 🔧 Pull Request Steps
89+
90+
TOAST UI products are open source, so you can create a pull request(PR) after you fix issues.
91+
Run npm scripts and develop yourself with the following process.
92+
93+
### Setup
94+
95+
Fork `master` branch into your personal repository.
96+
Clone it to local computer. Install node modules.
97+
Before starting development, you should check to haveany errors.
98+
99+
``` sh
100+
$ git clone https://github.com/{your-personal-repo}/tui.release-notes.git
101+
$ cd tui.release-notes
102+
$ npm install
103+
$ npm run test
104+
```
105+
106+
### Develop
107+
108+
Let's start development!
109+
Don't miss adding test cases and then make green rights.
110+
111+
#### Run karma test
112+
113+
``` sh
114+
$ npm run test
43115
```
44116

45-
## License
46-
This software is licensed under the [MIT License](https://github.com/nhnent/tui.release-notes/blob/master/LICENSE).
117+
### Pull Request
118+
119+
Before PR, check to test lastly and then check any errors.
120+
If it has no error, commit and then push it!
121+
122+
For more information on PR's step, please see links of Contributing section.
123+
124+
125+
## 💬 Contributing
126+
* [Code of Conduct](https://github.com/nhn/tui.release-notes/blob/master/CODE_OF_CONDUCT.md)
127+
* [Contributing guideline](https://github.com/nhn/tui.release-notes/blob/master/CONTRIBUTING.md)
128+
* [Issue guideline](https://github.com/nhn/tui.release-notes/blob/master/docs/ISSUE_TEMPLATE.md)
129+
* [Commit convention](https://github.com/nhn/tui.release-notes/blob/master/docs/COMMIT_MESSAGE_CONVENTION.md)
130+
131+
132+
## 🍞 TOAST UI Family
133+
134+
* [TOAST UI Editor](https://github.com/nhn/tui.editor)
135+
* [TOAST UI Calendar](https://github.com/nhn/tui.calendar)
136+
* [TOAST UI Chart](https://github.com/nhn/tui.chart)
137+
* [TOAST UI Image-Editor](https://github.com/nhn/tui.image-editor)
138+
* [TOAST UI Grid](https://github.com/nhn/tui.grid)
139+
* [TOAST UI Components](https://github.com/nhn)
140+
141+
142+
## 📜 License
143+
This software is licensed under the [MIT License](https://github.com/nhn/tui.release-notes/blob/master/LICENSE) © [NHN](https://github.com/nhn).

bin/tnote.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

bin/tui-note.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env node
2+
3+
'use strict';
4+
5+
require('../src/releaseNote').release();

0 commit comments

Comments
 (0)