Skip to content

Commit

Permalink
Merge pull request #30 from perehinik/dev
Browse files Browse the repository at this point in the history
Release 1.1.0
  • Loading branch information
perehinik authored Sep 20, 2023
2 parents 0c59b51 + 33849ae commit d77f0e7
Show file tree
Hide file tree
Showing 83 changed files with 14,343 additions and 17,991 deletions.
15 changes: 15 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"root": true,
"env": {
"browser": true,
"amd": true,
"node": true
},
"ignorePatterns": ["tests/", "dist/", "examples/"]
}
26 changes: 26 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Textolite

on: [push]

jobs:
tests:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up NPM
uses: actions/setup-node@v3
with:
node-version: "18.16.0"

- name: Install dependencies
run: |
npm install
- name: Static tests
run: |
npx eslint .
- name: Unit/integreation tests
run: |
npm test . -- --coverage
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/node_modules
/example
/examples
/images
/coverage
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## 1.1.0 (2023-09-19)

### New Features

1. Added buttons for vertical text alignment(subscript, superscript).
2. Added buttons for changng text indent.

### Improvements

1. Fixed issue when font name dissapears in drop down menu.
2. Fixed bug when tool panel background color was changing after changing text background color.
3. Fixed color panel to be able to use with touch screens not only mouse.
4. Improved test coverage.

</br></br></br>

## 1.0.0 (2023-09-06) Initial version.

### Features
Expand Down
82 changes: 72 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@ Textolite is a simle text editor.

## Using

In order to install package use ```npm iinstall textolite``` .
In order to install package:
```shell
npm i textolite
```

Then you can use it in your project:

```html
<div id="editor-container"></div>
```

```JavaScript
import { Editor } from 'textolite';
Expand All @@ -20,16 +29,69 @@ const html = editor.getHTML();

Please find example of usage below.


## Running tests

Running unit/integration tests: ```npm test```<br/>
Running unit/integration tests with coverage details: ```npm test -- --coverage```<br/>
Checking formatting: ```npx eslint .``` or ```npm run lint .``` <br/>


## Example

In order to run exemple:
1. Compile typescript files to js using ```tsc```.
2. Create global link to package using ```npm-link```.
3. Go to example folder.
4. Link local library to project ```npm-link textolite```.
5. Run example with ```npm run```.
There are 2 exemples. One uses React, second is just Vanilla JS.
Examples were meant to be used with local version of ```textolite``` library, but you can also use latest released version.

## Running tests
### Using latest released version of textolite library:

Skip this is you want to use local library.

1. Go to folder with example:
```shell
cd examples/react-example
```
2. Install textolite:
```shell
npm i textolite
```

### Create link to local textolite library:

In order to run tests run ```npm test```.<br/>
In order to show coverage details use *coverage* option: ```npm test -- --coverage```.
Skip this is you use latest released textolite.

1. Go to ```textolite``` directory.
2. Transpile typescript files to js:
```shell
tsc
```
3. Create global link to package:
```shell
npm link
```
4. Go to folder with example:
```shell
cd examples/react-example
```
5. Link local library to project:
```shell
npm link textolite
```

### Running example

1. Go to folder with example:
```shell
cd examples/react-example
```
2. Install packages:
```shell
npm install
```
3. Build main.js using webpack:
```shell
npm run build
```
3. Run example:
```shell
npm start
```
23 changes: 0 additions & 23 deletions example/.gitignore

This file was deleted.

70 changes: 0 additions & 70 deletions example/README.md

This file was deleted.

Loading

0 comments on commit d77f0e7

Please sign in to comment.