Skip to content
This repository was archived by the owner on Jun 8, 2021. It is now read-only.

Commit af98ea8

Browse files
authored
Merge pull request #5 from ming-tsai/dev
release-0.1.1
2 parents 8ea3208 + b628503 commit af98ea8

12 files changed

+61
-60
lines changed

.github/workflows/node.js.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ name: Node.js CI
55

66
on:
77
push:
8-
branches: [ master ]
8+
branches: [ master, dev ]
99
pull_request:
10-
branches: [ master ]
10+
branches: [ master, dev ]
1111

1212
jobs:
1313
build:

README.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# vue-typed
2-
![Node.js CI](https://github.com/ming-tsai/vue-typed/workflows/Node.js%20CI/badge.svg?branch=master)
3-
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ming-tsai_vue-typed&metric=alert_status)](https://sonarcloud.io/dashboard?id=ming-tsai_vue-typed)
1+
# vue-type-text
2+
![Node.js CI](https://github.com/ming-tsai/vue-type-text/workflows/Node.js%20CI/badge.svg?branch=master)
3+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ming-tsai_vue-type-text&metric=alert_status)](https://sonarcloud.io/dashboard?id=ming-tsai_vue-type-text)
44

55
> Typed components for VueJs.
66
@@ -14,16 +14,16 @@ You need [Vue.js](https://vuejs.org/) **version 2.5+**.
1414

1515
### 1. Install via npm
1616
```bash
17-
npm i @tsaibot/vue-typed
17+
npm i @tsaibot/vue-type-text
1818
// or
19-
yarn add @tsaibot/vue-typed
19+
yarn add @tsaibot/vue-type-text
2020
```
21-
### 2. Import and use VueTyped
21+
### 2. Import and use VueTypeText
2222
```js
2323
import Vue from 'vue';
24-
import VueTyped from '@tsaibot/vue-typed';
24+
import VueTypeText from '@tsaibot/vue-type-text';
2525

26-
Vue.use(VueTyped);
26+
Vue.use(VueTypeText);
2727

2828
// this is an example vue settings
2929
Vue.config.productionTip = false;
@@ -36,12 +36,12 @@ Or import on your view
3636
```html
3737
<script lang="ts">
3838
import Vue from 'vue';
39-
import VueTyped from '@/vue-typed.vue';
39+
import VueTypeText from '@/vue-type-text.vue';
4040
4141
export default Vue.extend({
4242
name: 'YourViewName',
4343
components: {
44-
VueTyped
44+
VueTypeText
4545
}
4646
});
4747
</script>
@@ -50,16 +50,16 @@ export default Vue.extend({
5050
```html
5151
<!-- your code here -->
5252
<!-- an example using as h1-->
53-
<vue-typed tag="h1" :text="['VueTyped', 'vue-typed', 'vueTyped']"/>
53+
<vue-type-text tag="h1" :text="['VueTypeText', 'vue-type-text', 'vueTyped']"/>
5454
<!-- an example using as span-->
55-
<vue-typed text="Welcome to Your VueTyped" />
55+
<vue-type-text text="Welcome to Your VueTypeText" />
5656
<!-- your code here -->
5757
```
5858
### Alternatively
5959
```html
60-
<!-- VueTyped JavaScript -->
61-
<script src="https://cdn.jsdelivr.net/npm/@tsaibot/vue-typed/dist/vue-typed.min.js"></script>
60+
<!-- VueTypeText JavaScript -->
61+
<script src="https://cdn.jsdelivr.net/npm/@tsaibot/vue-type-text/dist/vue-type-text.min.js"></script>
6262

6363
```
6464
## License
65-
Code released under [MIT](https://github.com/ming-tsai/vue-typed/blob/master/LICENSE) license.
65+
Code released under [MIT](https://github.com/ming-tsai/vue-type-text/blob/master/LICENSE) license.

build/rollup.config.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ if (!argv.format || argv.format === 'es') {
6969
...baseConfig,
7070
external,
7171
output: {
72-
file: 'dist/vue-typed.esm.js',
72+
file: 'dist/vue-type-text.esm.js',
7373
format: 'esm',
7474
exports: 'named',
7575
},
@@ -103,9 +103,9 @@ if (!argv.format || argv.format === 'cjs') {
103103
external,
104104
output: {
105105
compact: true,
106-
file: 'dist/vue-typed.ssr.js',
106+
file: 'dist/vue-type-text.ssr.js',
107107
format: 'cjs',
108-
name: 'VueTyped',
108+
name: 'VueTypeText',
109109
exports: 'named',
110110
globals,
111111
},
@@ -132,9 +132,9 @@ if (!argv.format || argv.format === 'iife') {
132132
external,
133133
output: {
134134
compact: true,
135-
file: 'dist/vue-typed.min.js',
135+
file: 'dist/vue-type-text.min.js',
136136
format: 'iife',
137-
name: 'VueTyped',
137+
name: 'VueTypeText',
138138
exports: 'named',
139139
globals,
140140
},

dev/serve.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
<script lang="ts">
22
import Vue from 'vue';
3-
import VueTyped from '@/vue-typed.vue';
3+
import VueTypeText from '@/vue-type-text.vue';
44
55
export default Vue.extend({
66
name: 'ServeDev',
77
components: {
8-
VueTyped
8+
VueTypeText
99
}
1010
});
1111
</script>
1212

1313
<template>
1414
<div id="app">
1515
<img alt="Vue logo" src="./assets/logo.png" />
16-
<vue-typed tag="h1" :text="['VueTyped', 'vue-typed', 'vueTyped']"/>
17-
<vue-typed tag="p" text="Welcome to Your VueTyped" />
16+
<vue-type-text tag="h1" :text="['VueTypeText', 'vue-type-text', 'vue type text']"/>
17+
<vue-type-text tag="p" text="Welcome to Your VueTypeText" />
1818
</div>
1919
</template>
2020

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+16-15
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
11
{
2-
"name": "@tsaibot/vue-typed",
3-
"version": "0.1.0-preview8",
2+
"name": "vue-type-text",
3+
"version": "0.1.1",
44
"description": "Typed components for VueJs",
55
"repository": {
66
"type": "git",
7-
"url": "git+https://github.com/ming-tsai/vue-typed.git"
7+
"url": "git+https://github.com/ming-tsai/vue-type-text.git"
88
},
99
"keywords": [
10-
"vue-typer",
10+
"typer",
1111
"vue",
12-
"vue-component",
13-
"vue-type-effect",
14-
"vue-typed"
12+
"animation",
13+
"component",
14+
"typed",
15+
"vue-type-text"
1516
],
1617
"author": "Ming Tsai",
1718
"license": "MIT",
1819
"bugs": {
19-
"url": "https://github.com/ming-tsai/vue-typed/issues"
20+
"url": "https://github.com/ming-tsai/vue-type-text/issues"
2021
},
21-
"homepage": "https://github.com/ming-tsai/vue-typed#readme",
22-
"main": "dist/vue-typed.ssr.js",
23-
"browser": "dist/vue-typed.esm.js",
24-
"module": "dist/vue-typed.esm.js",
25-
"unpkg": "dist/vue-typed.min.js",
26-
"types": "vue-typed.d.ts",
22+
"homepage": "https://github.com/ming-tsai/vue-type-text#readme",
23+
"main": "dist/vue-type-text.ssr.js",
24+
"browser": "dist/vue-type-text.esm.js",
25+
"module": "dist/vue-type-text.esm.js",
26+
"unpkg": "dist/vue-type-text.min.js",
27+
"types": "vue-type-text.d.ts",
2728
"files": [
2829
"dist/*",
29-
"vue-typed.d.ts",
30+
"vue-type-text.d.ts",
3031
"src/**/*.vue"
3132
],
3233
"scripts": {

src/entry.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import _Vue, { PluginFunction, VueConstructor } from 'vue';
22

33
// Import vue component
4-
import component from '@/vue-typed.vue';
4+
import component from '@/vue-type-text.vue';
55

66
// Define typescript interfaces for autoinstaller
77
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -13,10 +13,10 @@ interface InstallableComponent extends VueConstructor<_Vue> {
1313
}
1414

1515
// install function executed by Vue.use()
16-
const install: InstallFunction = function installVueTyped(Vue: typeof _Vue) {
16+
const install: InstallFunction = function installVueTypeText(Vue: typeof _Vue) {
1717
if (install.installed) return;
1818
install.installed = true;
19-
Vue.component('VueTyped', component);
19+
Vue.component('VueTypeText', component);
2020
};
2121

2222
// Create module definition for Vue.use()
File renamed without changes.

src/vue-typed.ts renamed to src/vue-type-text.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import Vue from 'vue';
22

3-
interface VueType {
3+
interface VueTypeText {
44
isDone: boolean;
55
arrayIndex: number;
66
bindingText: string;
77
}
88

99
export default Vue.extend({
10-
name: 'VueTyped', // vue component name
10+
name: 'VueTypeText', // vue component name
1111
props: {
1212
timeTakes: {
1313
type: Number,
@@ -36,7 +36,7 @@ export default Vue.extend({
3636
validator: value => ['p', 'h1', 'h2', 'h3', 'h4', 'span'].includes(value)
3737
}
3838
},
39-
data(): VueType {
39+
data(): VueTypeText {
4040
return {
4141
isDone: false,
4242
arrayIndex: 0,

src/vue-type-text.vue

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<template>
2+
<component :is="tag">
3+
<span class="vue-type-text">{{ bindingText }}</span>
4+
<span class="caret" v-if="!isDone"></span>
5+
</component>
6+
</template>
7+
8+
<script lang="ts" src="./vue-type-text.ts"></script>
9+
<style src="./vue-type-text.css" scoped></style>

src/vue-typed.vue

-9
This file was deleted.

vue-typed.d.ts renamed to vue-type-text.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ export interface InstallableComponent extends VueConstructor<Vue> {
88
install: InstallFunction;
99
}
1010

11-
declare const VueTyped: InstallableComponent;
12-
export default VueTyped;
11+
declare const VueTypeText: InstallableComponent;
12+
export default VueTypeText;

0 commit comments

Comments
 (0)