Skip to content
This repository was archived by the owner on Feb 17, 2022. It is now read-only.

Commit fd105e5

Browse files
author
Viktor Pöntinen
committed
Merge branch 'develop'
2 parents 5c86cc8 + c0eb47a commit fd105e5

25 files changed

+3402
-687
lines changed

.babelrc

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

.editorconfig

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

.eslintrc

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

.gitignore

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1 @@
1-
# Logs
2-
logs
3-
*.log
4-
5-
# Runtime data
6-
pids
7-
*.pid
8-
*.seed
9-
10-
# Directory for instrumented libs generated by jscoverage/JSCover
11-
lib-cov
12-
13-
# Coverage directory used by tools like istanbul
14-
coverage
15-
16-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17-
.grunt
18-
19-
# node-waf configuration
20-
.lock-wscript
21-
22-
# Compiled binary addons (http://nodejs.org/api/addons.html)
23-
build/Release
24-
25-
# Dependency directory
26-
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
27-
node_modules
1+
node_modules

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
8.9.4

.travis.yml

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

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MIT License
2+
3+
Copyright (c) 2018 Viktor Pöntinen
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+

README.md

Lines changed: 46 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,67 @@
1-
## ⌨️ TinyTyper - a tiny library for creating a typing effect on specified text element.
2-
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
3-
[![Build Status](https://travis-ci.org/lourenc/tinytyper.svg?branch=develop)](https://travis-ci.org/lourenc/tinytyper)
4-
[![Dependency Status](https://gemnasium.com/badges/github.com/lourenc/tinytyper.svg)](https://gemnasium.com/github.com/lourenc/tinytyper)
1+
## VueTinyTyper - a vue component for creating a typing effect element.
52

6-
#### Demo
7-
<img align="center" src="http://g.recordit.co/8MTkbe9Crg.gif">
3+
#### Credits
4+
This project is forked from https://github.com/lourenc/tinytyper .
5+
Some parts of the readme are also originally from above repository.
6+
7+
#### Why
8+
This project was created because I was missing events in the non-vue version.
89

9-
#### Size (It's really tiny)
10-
- Minimized: 2.9KB
11-
- Gziped: 1.1KB
10+
#### Demo
11+
Full credits to https://github.com/lourenc/tinytyper
12+
<img align="center" src="https://s28.postimg.org/4qva5c1f1/tinytyper2.gif">
1213

1314
#### Installation
14-
Library can be easily installed via either NPM or Bower:
15+
Library can be easily installed via either Yarn or NPM:
1516

16-
`npm i tinytyper --save`
17+
`npm i vue-tinytyper --save`
1718

18-
OR
19+
or
1920

20-
`bower i tinytyper --save`
21+
`yarn add vue-tinytyper`
2122

2223
#### Usage
2324

2425
Basic setup looks like this:
2526

2627
```js
27-
import TinyTyper from 'tinytyper';
28-
29-
const el = document.querySelector('.text-el')
30-
const options = { /* . . . */ }
31-
const instance = new TinyTyper(el, options)
28+
import VueTinytyper from 'vue-tinytyper';
3229
```
33-
34-
In case you need to run animation again:
30+
then
31+
```js
32+
<vue-tinytyper text="Hello, please type this out."></vue-tinytyper>
33+
```
34+
or
3535
```js
36-
instance.animate()
36+
<vue-tinytyper>Hello, please type this out.</vue-tinytyper>
3737
```
3838

39-
Available `options`:
39+
Available `props`:
40+
41+
Prop | Default | Type | Description
42+
---------------- | ------------- | ----------- | --------------
43+
`text` | `` | String | The text to animate
44+
`textSpeed` | `95` | Number | Defines text speed animation
45+
`cursor` | `&#9612;` | String | Defines current cursor symbol
46+
`blinkSpeed` | `0.05` | Number | Defines blink speed of the cursor
47+
`containerClass` | 'tiny-typer-container' | String | A CSS class for the container element
48+
`cursorClass` | `tiny-typer-cursor` | String | A CSS class for cursor element
49+
`textClass` | `tiny-typer-text` | String | A CSS class for text element
50+
`staticCursor` | `false` | Boolean | Makes cursor static (disables blinking)
51+
`staticText` | `false` | Boolean | Makes text static (disables animation)
52+
`customEvents` | `{}` | Object | Pass custom "on-character" events. Example: `{ '!': 'my-event' }`, where the event 'my-event' will be triggered every time the current animation character matches the object key, eg. "!".
53+
4054

41-
Option | Default | Description
42-
------------- | -------------|--------------
43-
`text` | `innerText` of specifed `el`ement | Sets a text to be displayed
44-
`textSpeed` | `95` | Defines of text speed animation
45-
`cursor` | ` &#9612;` | Defines current cursor symbol
46-
`blinkSpeed` | `0.05` | Defines blink speed of a cursor
47-
`cursorClass` | `tiny-typer-cursor` | A CSS class for cursor element
48-
`textClass` | `tiny-typer-text` | A CSS class for text element
49-
`staticCursor`| `false` | Makes cursor static (disables blinking)
50-
`staticText` | `false` | Makes text static (disables animation)
55+
Available `events`
56+
57+
Eventname | Trigger | Payload
58+
------------- | ---------- | ----------
59+
`animation-finished` | When animation doesn't have any more characters to animate | None
5160

5261
#### Contributions
5362

54-
Contributions are welcome. Feel free to create [issues](https://github.com/lourenc/tinytyper/issues) and [PRs](https://github.com/lourenc/tinytyper/pulls)
63+
Contributions are welcome. Feel free to create [issues](https://github.com/ViktorPontinen/vue-tinytyper/issues)
64+
65+
#### License
66+
67+
MIT

bower.json

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

dist/vue-tinytyper.min.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)