tg-blog 1.0.0-alpha.4 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -15
- package/package.json +2 -5
package/README.md
CHANGED
|
@@ -1,22 +1,42 @@
|
|
|
1
|
-
#
|
|
1
|
+
# tg-blog: Display Telegram Channel in a Blog
|
|
2
2
|
|
|
3
|
-
Demo:
|
|
3
|
+
Demo: TODO
|
|
4
4
|
|
|
5
|
-
Usage
|
|
5
|
+
## Usage
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
2. Change project name in package.json
|
|
9
|
-
3. `yarn install`
|
|
10
|
-
4. `yarn serve`
|
|
7
|
+
### Usage in Vite
|
|
11
8
|
|
|
12
|
-
|
|
9
|
+
#### 1. Install dependencies
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
```
|
|
12
|
+
yarn add tg-blog
|
|
13
|
+
```
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
#### 2. Import CSS in your `main.ts`
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
```ts
|
|
18
|
+
import {createApp, h} from 'vue'
|
|
19
|
+
import App from './App.vue'
|
|
20
|
+
// Add this:
|
|
21
|
+
import 'tg-blog/dist/style.css'
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
#### 3. In your `vite.config.ts`, you shall configure to dedupe `vue`
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
export default defineConfig({
|
|
28
|
+
resolve: {
|
|
29
|
+
dedupe: ['vue'],
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
#### 4. Import components
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
import { TgBlog } from 'tg-blog';
|
|
38
|
+
|
|
39
|
+
// If you're using Vue-TS Class Component, then add this:
|
|
40
|
+
@Options({components: { TgBlog }})
|
|
41
|
+
export default class ...
|
|
42
|
+
```
|
package/package.json
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tg-blog",
|
|
3
|
-
"version": "1.0.0
|
|
4
|
-
"browser": {
|
|
5
|
-
"./sfc": "src/"
|
|
6
|
-
},
|
|
3
|
+
"version": "1.0.0",
|
|
7
4
|
"scripts": {
|
|
8
5
|
"dev": "vite",
|
|
9
6
|
"serve": "vite",
|
|
10
7
|
"build": "vue-tsc && vite build",
|
|
11
8
|
"lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src"
|
|
12
9
|
},
|
|
13
|
-
"
|
|
10
|
+
"dependencies": {
|
|
14
11
|
"@fortawesome/fontawesome-free": "^6.2.1",
|
|
15
12
|
"element-plus": "^2.2.26",
|
|
16
13
|
"linkify-urls": "^4.0.0",
|