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.
Files changed (2) hide show
  1. package/README.md +35 -15
  2. package/package.json +2 -5
package/README.md CHANGED
@@ -1,22 +1,42 @@
1
- # Vue 3 TS + Vite + Vue Router + SASS Template
1
+ # tg-blog: Display Telegram Channel in a Blog
2
2
 
3
- Demo: https://template.hydev.org/
3
+ Demo: TODO
4
4
 
5
- Usage:
5
+ ## Usage
6
6
 
7
- 1. Clone this repo
8
- 2. Change project name in package.json
9
- 3. `yarn install`
10
- 4. `yarn serve`
7
+ ### Usage in Vite
11
8
 
12
- ## Info
9
+ #### 1. Install dependencies
13
10
 
14
- Web Framework: `Vue 3 + Typescript + Vite + Vue Router + SASS + Element Plus + Class Components`
11
+ ```
12
+ yarn add tg-blog
13
+ ```
15
14
 
16
- Useful Documentations:
15
+ #### 2. Import CSS in your `main.ts`
17
16
 
18
- * [Script Setup SFC](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup)
19
- * [Vite Docs](https://vitejs.dev/guide/features.html)
20
- * [Vue 3 Docs](https://v3.vuejs.org/)
21
- * Recommended IDE: [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)
22
- * My IDE: IDEA + Vue Plugin
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-alpha.4",
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
- "peerDependencies": {
10
+ "dependencies": {
14
11
  "@fortawesome/fontawesome-free": "^6.2.1",
15
12
  "element-plus": "^2.2.26",
16
13
  "linkify-urls": "^4.0.0",