Skip to content

Commit

Permalink
feat: monorepo (#524)
Browse files Browse the repository at this point in the history
* chore: init lerna options

* chore: Docs

* chore: Development environment

* interim

* feat: Add Storybook

* fix: Use uiSize option

* doc: Add README.md

* chore: Modify README.md

* chore: Modify README.md

* chore: Bundle v1.0.0

* Merge branch 'master' into production

* Merge branch 'master' into production

* chore: version up v1.0.1

* Merge branch 'master' into production

* chore: Bundle v1.1.0

* Merge branch 'master' into production

* chore: Bundle v1.2.0

* Merge branch 'master' into production

# Conflicts:
#	.gitignore

* Merge branch 'master' into production

* chore: import react wrapper

* chore: check npm bundle, change comment

* chore: update tuidoc config

* chore: update tslint.json

* feat: Implement vue wrapper for tui.ImageEditor

* docs: add homepage, repository info

* Merge pull request #1 from nhnent/feat/example

chore : add fast example using @vue/cli

* fix: update vue/cli (Security vulnerability response)

* chore: update v1.0.1

* chore: update tui-image-editor version

* chore: update tilde dependency package version

* 1.0.2

* Merge pull request #12 from nhnent/chore/change-company-name

chore: change company name(nhnent -> nhn)

* Merge pull request #17 from nhn/docs/links/nhnent-to-nhn

docs: update links 'nhnent' to 'nhn'

* fix: Remove 'editorInstance' from 'data' for memory issue (#19)

* fix: Remove editorInstance from data property

* chore: Modify example code

* chore: Update ImageEditor version to v3.7.0

* chore: Add 'example' to eslint exclude path

* fix: Apply code-review

* fix: Bind events passed to props only

* refactor: Remove event name filter

* chore: Modify ImageEditor version prefix to carrot

* chore: Update version to v1.1.0

* chore: Add 'postinstall' to package.json

* chore: update version to v1.2.0

* chore: update version to v1.2.1

* chore: update version to v1.3.0

* chore: import vue wrapper

* chore: apply prettier

* chore: fix README

* chore: update gitignore

* chore: update version to 3.12.0

* chore: change ASCII code %20 to space

* docs: update README

* chore: apply code review

Co-authored-by: junghwan-park <junghwan.park@nhnent.com>
Co-authored-by: jung-han <hanjung@nhnent.com>
Co-authored-by: 김진우 <jw.kim@nhnent.com>
Co-authored-by: jungeun-cho <jenny.cho@nhnent.com>
Co-authored-by: jjo Cho <jodeng110@gmail.com>
Co-authored-by: 유동식 <dongsik.yoo@nhnent.com>
Co-authored-by: 박정환 <junghwan-park@users.noreply.github.com>
  • Loading branch information
8 people committed Feb 22, 2021
1 parent de9ac14 commit 2905f5f
Show file tree
Hide file tree
Showing 40 changed files with 98,984 additions and 13,603 deletions.
27 changes: 22 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ node_modules
bower_components
lib

#JSDOC
doc

# IDEA
.idea
*.iml
Expand All @@ -46,13 +49,27 @@ Desktop.ini
.project
.metadata

# build
build

#report / screenshots
report
screenshots

# Atom
tags
.ctags
.tern-project

# etc
.agignore
*.swp
etc
temp
doc
demo
report
api
.tern-port
*.vim
test.html
.\#*
.vscode

# Compiled files
dist
7 changes: 6 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@
"useTabs": false,
"semi": true,
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"trailingComma": "es5",
"arrowParens": "always",
"endOfLine": "lf",
"bracketSpacing": true,
"proseWrap": "preserve"
"jsxBracketSameLine": false,
"requirePragma": false,
"insertPragma": false,
"proseWrap": "preserve",
"vueIndentScriptAndStyle": false
}
250 changes: 28 additions & 222 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,66 +2,40 @@

> Full featured image editor using HTML5 Canvas. It's easy to use and provides powerful filters.
[![github version](https://img.shields.io/github/release/nhn/tui.image-editor.svg)](https://github.com/nhn/tui.image-editor/releases/latest) [![npm version](https://img.shields.io/npm/v/tui-image-editor.svg)](https://www.npmjs.com/package/tui-image-editor) [![bower version](https://img.shields.io/bower/v/tui.image-editor.svg)](https://github.com/nhn/tui.image-editor/releases/latest) [![license](https://img.shields.io/github/license/nhn/tui.image-editor.svg)](https://github.com/nhn/tui.image-editor/blob/master/LICENSE) [![PRs welcome](https://img.shields.io/badge/PRs-welcome-ff69b4.svg)](https://github.com/nhn/tui.image-editor/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)[![code with hearth by NHN](https://img.shields.io/badge/%3C%2F%3E%20with%20%E2%99%A5%20by-NHN%20Entertainment-ff1414.svg)](https://github.com/nhn)
[![github version](https://img.shields.io/github/release/nhn/tui.image-editor.svg)](https://github.com/nhn/tui.image-editor/releases/latest)
[![npm version](https://img.shields.io/npm/v/tui-image-editor.svg)](https://www.npmjs.com/package/tui-image-editor)
[![license](https://img.shields.io/github/license/nhn/tui.image-editor.svg)](https://github.com/nhn/tui.image-editor/blob/master/LICENSE)
[![PRs welcome](https://img.shields.io/badge/PRs-welcome-ff69b4.svg)](https://github.com/nhn/tui.image-editor/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)
[![code with hearth by NHN](https://img.shields.io/badge/%3C%2F%3E%20with%20%E2%99%A5%20by-NHN-ff1414.svg)](https://github.com/nhn)
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)

## Wrappers
## Packages

- [toast-ui.vue-image-editor](https://github.com/nhn/toast-ui.vue-image-editor): Vue wrapper component is powered by [NHN](https://github.com/nhn).
- [toast-ui.react-image-editor](https://github.com/nhn/toast-ui.react-image-editor): React wrapper component is powered by [NHN](https://github.com/nhn).
- [toast-ui.image-editor](https://github.com/nhn/tui.image-editor/tree/main/apps/image-editor) - Plain JavaScript component implemented by [NHN](https://github.com/nhn).
- [toast-ui.vue-image-editor](https://github.com/nhn/tui.image-editor/tree/main/apps/vue-image-editor) - **Vue** wrapper component is powered by [NHN](https://github.com/nhn).
- [toast-ui.react-image-editor](https://github.com/nhn/tui.image-editor/tree/main/apps/react-image-editor) - **React** wrapper component is powered by [NHN](https://github.com/nhn).

![6 -20-2018 17-45-54](https://user-images.githubusercontent.com/35218826/41647896-7b218ae0-74b2-11e8-90db-d7805cc23e8c.gif)

## 🚩 Table of Contents

- [Collect statistics on the use of open source](#Collect-statistics-on-the-use-of-open-source)
- [Browser Support](#-browser-support)
- [Has full features that stick to the basic.](#-has-full-features-that-stick-to-the-basic)
- [Photo manipulation](#photo-manipulation)
- [Integration function](#integration-function)
- [Powerful filter function](#powerful-filter-function)
- [Select only the desired function](#select-only-the-desired-function)
- [Easy to apply the size and design you want](#-easy-to-apply-the-size-and-design-you-want)
- [Can be used everywhere](#can-be-used-everywhere)
- [Nice default & Fully customizable Themes](#nice-default--fully-customizable-themes)
- [Features](#-features)
- [Install](#-install)
- [Via Package Manager](#via-package-manager)
- [Via Contents Delivery Network (CDN)](#via-contents-delivery-network-cdn)
- [Download Source Files](#download-source-files)
- [Usage](#-usage)
- [HTML](#html)
- [JavaScript](#javascript)
- [Menu svg icon setting](#menu-svg-icon-setting)
- [TypeScript](#typescript)
- [Development](#-development)
- [Setup](#setup)
- [Run webpack-dev-server](#run-webpack-dev-server)
- [Pull Request Steps](#-pull-request-steps)
- [Documents](#-documents)
- [Contributing](#-contributing)
- [Dependency](#-dependency)
- [TOAST UI Family](#-toast-ui-family)
- [Used By](#-used-by)
- [License](#-license)

## Collect statistics on the use of open source

TOAST UI ImageEditor applies Google Analytics (GA) to collect statistics on the use of open source, in order to identify how widely TOAST UI ImageEditor is used throughout the world. It also serves as important index to determine the future course of projects. location.hostname (e.g. > “ui.toast.com") is to be collected and the sole purpose is nothing but to measure statistics on the usage. To disable GA, use the following `usageStatistics` option when creating the instance.

```js
var options = {
//...
usageStatistics: false,
};

var imageEditor = new tui.ImageEditor('#tui-image-editor-container', options);
```

Or, include [`tui-code-snippet`](https://github.com/nhn/tui.code-snippet)(**v1.4.0** or **later**) and then immediately write the options as follows:

```js
tui.usageStatistics = false;
```

## 🌏 Browser Support

| <img src="https://user-images.githubusercontent.com/1215767/34348387-a2e64588-ea4d-11e7-8267-a43365103afe.png" alt="Chrome" width="16px" height="16px" /> Chrome | <img src="https://user-images.githubusercontent.com/1215767/34348590-250b3ca2-ea4f-11e7-9efb-da953359321f.png" alt="IE" width="16px" height="16px" /> Internet Explorer | <img src="https://user-images.githubusercontent.com/1215767/34348380-93e77ae8-ea4d-11e7-8696-9a989ddbbbf5.png" alt="Edge" width="16px" height="16px" /> Edge | <img src="https://user-images.githubusercontent.com/1215767/34348394-a981f892-ea4d-11e7-9156-d128d58386b9.png" alt="Safari" width="16px" height="16px" /> Safari | <img src="https://user-images.githubusercontent.com/1215767/34348383-9e7ed492-ea4d-11e7-910c-03b39d52f496.png" alt="Firefox" width="16px" height="16px" /> Firefox |
Expand Down Expand Up @@ -127,17 +101,6 @@ tui.usageStatistics = false;
| ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| ![multifly](https://user-images.githubusercontent.com/35218826/41753467-92baae28-7608-11e8-80d2-187a310213f5.png) | ![tint](https://user-images.githubusercontent.com/35218826/41753468-92e6391c-7608-11e8-8977-651366ebe693.png) | ![brightness](https://user-images.githubusercontent.com/35218826/41753457-8fb3d3c6-7608-11e8-9e1d-10c6e4aeba68.png) | ![remove-white](https://user-images.githubusercontent.com/35218826/41753463-917feeb0-7608-11e8-862d-eb3af84e120a.png) | ![sharpen](https://user-images.githubusercontent.com/35218826/41753639-91b8470a-7609-11e8-8d13-48ac3232365b.png) |

### Select only the desired function

```javascripot
var imageEditor = new tui.ImageEditor('#tui-image-editor-container', {
includeUI: {
menu: ['shape', 'crop']
...
},
...
```

## 🙆 Easy to apply the size and design you want

### Can be used everywhere.
Expand Down Expand Up @@ -172,193 +135,36 @@ var imageEditor = new tui.ImageEditor('#tui-image-editor-container', {
- Mask Filter
- Image Filter

## 💾 Install

The TOAST UI products can be installed by using the package manager or downloading the source directly.
However, we highly recommend using the package manager.

### Via Package Manager

You can find TOAST UI producs via [npm](https://www.npmjs.com/) and [bower](https://bower.io/) package managers.
Install by using the commands provided by each package manager.
When using npm, be sure [Node.js](https://nodejs.org) is installed in the environment.

#### npm

#### 1. ImageEditor installation

```sh
$ npm install --save tui-image-editor # Latest version
$ npm install --save tui-image-editor@<version> # Specific version
```

##### 2. If the installation of the `fabric.js` dependency module does not go smoothly

To solve the problem, you need to refer to [Some Steps](https://github.com/fabricjs/fabric.js#install-with-npm) to solve the problem.

#### bower

```sh
$ bower install tui-image-editor # Latest version
$ bower install tui-image-editor#<tag> # Specific version
```

### Via Contents Delivery Network (CDN)

TOAST UI products are available over the CDN powered by [TOAST Cloud](https://www.toast.com).

You can use the CDN as below.

```html
<link
rel="stylesheet"
href="https://uicdn.toast.com/tui-image-editor/latest/tui-image-editor.css"
/>
<script src="https://uicdn.toast.com/tui-image-editor/latest/tui-image-editor.js"></script>
```

If you want to use a specific version, use the tag name instead of `latest` in the URL.

The CDN directory has the following structure.

```
tui-image-editor/
├─ latest/
│ ├─ tui-image-editor.js
│ ├─ tui-image-editor.min.js
│ └─ tui-image-editor.css
├─ v3.1.0/
│ ├─ ...
```

### Download Source Files

- [Download bundle files from `dist` folder](https://github.com/nhn/tui.image-editor/tree/production/dist)
- [Download all sources for each version](https://github.com/nhn/tui.image-editor/releases)

## 🔨 Usage

### HTML

Add the container element where TOAST UI ImageEditor will be created.

```html
<body>
...
<div id="tui-image-editor"></div>
...
</body>
```

### javascript

Add dependencies & initialize ImageEditor class with given element to make an image editor.

```javascript
var ImageEditor = require('tui-image-editor');
var FileSaver = require('file-saver'); //to download edited image to local. Use after npm install file-saver
var blackTheme = require('./js/theme/black-theme.js');
var locale_ru_RU = {
// override default English locale to your custom
Crop: 'Обзрезать',
'Delete-all': 'Удалить всё',
// etc...
};
var instance = new ImageEditor(document.querySelector('#tui-image-editor'), {
includeUI: {
loadImage: {
path: 'img/sampleImage.jpg',
name: 'SampleImage',
},
locale: locale_ru_RU,
theme: blackTheme, // or whiteTheme
initMenu: 'filter',
menuBarPosition: 'bottom',
},
cssMaxWidth: 700,
cssMaxHeight: 500,
selectionStyle: {
cornerSize: 20,
rotatingPointOffset: 70,
},
});
```

Or ~ UI

```javascript
var ImageEditor = require('tui-image-editor');
var instance = new ImageEditor(document.querySelector('#tui-image-editor'), {
cssMaxWidth: 700,
cssMaxHeight: 500,
selectionStyle: {
cornerSize: 20,
rotatingPointOffset: 70,
},
});
```

### Menu svg icon setting

#### There are two ways to set icons.

1. **Use default svg built** into imageEditor without setting svg file path (Features added since version v3.9.0).
2. There is a way to use the **actual physical svg file** and **set the file location manually**.
## 🔧 Pull Request Steps

Can find more details in [this document](https://github.com/nhn/tui.image-editor/blob/master/docs/Basic-Tutorial.md#4-menu-submenu-svg-icon-setting).

### TypeScript

If you using TypeScript, You must `import module = require('module')` on importing.
[`export =` and `import = require()`](https://www.typescriptlang.org/docs/handbook/modules.html#export--and-import--require)

```typescript
import ImageEditor = require('tui-image-editor');
var FileSaver = require('file-saver'); //to download edited image to local. Use after npm install file-saver

const instance = new ImageEditor(document.querySelector('#tui-image-editor'), {
cssMaxWidth: 700,
cssMaxHeight: 500,
selectionStyle: {
cornerSize: 20,
rotatingPointOffset: 70,
},
});
```

See [details](https://nhn.github.io/tui.image-editor/latest) for additional informations.

## 🔧 Development

The TOAST UI products are open-source.
After fixing issues, create a pull request(PR).
Run npm scripts and develop with the following process.
TOAST UI products are open source, so you can create a pull request(PR) after you fix issues.
Run npm scripts and develop yourself with the following process.

### Setup

Fork `master` branch into your personal repository.
Clone to local computer.
Install node modules.
Before starting development, check for any errors.
Fork `develop` branch into your personal repository.
Clone it to local computer. Install node modules.
Before starting development, you should check to haveany errors.

```sh
$ git clone https://github.com/{username}/tui.image-editor.git
$ cd tui.image-editor
$ git clone https://github.com/{your-personal-repo}/[[repo name]].git
$ cd [[repo name]]
$ npm install
$ npm run test
```

### Run webpack-dev-server
### Pull Request

```sh
$ npm run serve
```
Before PR, check to test lastly and then check any errors.
If it has no error, commit and then push it!

For more information on PR's step, please see links of Contributing section.

## 📙 Documents

- **Tutorial** : [https://github.com/nhn/tui.image-editor/tree/master/docs](https://github.com/nhn/tui.image-editor/tree/master/docs)
- **Example** : [http://nhn.github.io/tui.image-editor/latest/tutorial-example01-includeUi](http://nhn.github.io/tui.image-editor/latest/tutorial-example01-includeUi)
- **API** : [http://nhn.github.io/tui.image-editor/latest](http://nhn.github.io/tui.image-editor/latest/index)
- [Getting Started](https://github.com/nhn/tui.image-editor/tree/master/docs/Basic-Tutorial.md)
- [Tutorial](https://github.com/nhn/tui.image-editor/tree/master/docs)
- [Example](http://nhn.github.io/tui.image-editor/latest/tutorial-example01-includeUi)
- [API](http://nhn.github.io/tui.image-editor/latest)

## 💬 Contributing

Expand Down
1 change: 0 additions & 1 deletion apps/image-editor/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,5 @@ module.exports = {
AssignmentExpression: { array: false, object: false },
},
],
'prettier/prettier': 'error',
},
};

0 comments on commit 2905f5f

Please sign in to comment.