Skip to content

Commit

Permalink
教程文档编写
Browse files Browse the repository at this point in the history
  • Loading branch information
greatjiang committed Apr 19, 2024
1 parent a231cb0 commit dde5b0d
Show file tree
Hide file tree
Showing 12 changed files with 50 additions and 35 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import GreatBrick from 'greatbrick'
app.use(GreatBrick)
// 按需引入
import 'greatbrick/dist/css/button.css'
import {Button} from 'greatbrick'
app.use(Button)
import {GButton} from 'greatbrick'
app.use(GButton)
```

1 change: 0 additions & 1 deletion components/css/main.scss

This file was deleted.

14 changes: 7 additions & 7 deletions docs/.vitepress/cache/deps/_metadata.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
{
"hash": "2779a534",
"hash": "62770e55",
"configHash": "9f7a6506",
"lockfileHash": "f1e1c694",
"browserHash": "227d45d7",
"lockfileHash": "02439db7",
"browserHash": "d8565895",
"optimized": {
"vue": {
"src": "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
"file": "vue.js",
"fileHash": "cc4854b6",
"fileHash": "e4cd7a33",
"needsInterop": false
},
"vitepress > @vue/devtools-api": {
"src": "../../../../node_modules/@vue/devtools-api/dist/index.js",
"file": "vitepress___@vue_devtools-api.js",
"fileHash": "84f0915f",
"fileHash": "977e5017",
"needsInterop": false
},
"vitepress > @vueuse/core": {
"src": "../../../../node_modules/@vueuse/core/index.mjs",
"file": "vitepress___@vueuse_core.js",
"fileHash": "84e0d417",
"fileHash": "bc15ef14",
"needsInterop": false
},
"@theme/index": {
"src": "../../../../node_modules/vitepress/dist/client/theme-default/index.js",
"file": "@theme_index.js",
"fileHash": "5337282e",
"fileHash": "2bdebd85",
"needsInterop": false
}
},
Expand Down
15 changes: 10 additions & 5 deletions docs/.vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,26 @@ import { defineConfig } from 'vitepress'
// https://vitepress.dev/reference/site-config
export default defineConfig({
base: "/greatbrick/",
title: "greatbrick",
title: "GreatBrick",
description: "greatbrick components",
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: 'Home', link: '/' },
{ text: 'Examples', link: '/markdown-examples' }
{ text: '组件', link: '/components-examples' }
],

sidebar: [
{
text: 'Examples',
text: '开发指南',
items: [
{ text: 'Markdown Examples', link: '/markdown-examples' },
{ text: 'Runtime API Examples', link: '/api-examples' }
{ text: '安装', link: '/install' }
]
},
{
text: '基础',
items: [
{ text: '按钮', link: '/button' },
]
}
],
Expand Down
1 change: 1 addition & 0 deletions docs/button.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# 按钮
File renamed without changes.
1 change: 1 addition & 0 deletions docs/docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# 教程
23 changes: 10 additions & 13 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,20 @@
layout: home

hero:
name: "greatbrick"
text: "greatbrick components"
tagline: My great project tagline
name: "GreatBrick"
tagline: 基于Vue3的Admin后台管理组件库
actions:
- theme: brand
text: Markdown Examples
link: /markdown-examples
text: 快速开始
link: /install.md
- theme: alt
text: API Examples
link: /api-examples
text: 教程文档
link: /button.md

features:
- title: Feature A
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
- title: Feature B
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
- title: Feature C
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
- title: 最新技术栈
details: vue3、vite等最新技术栈开发
- title: 组件封装
details: 对常用功能进行组件化封装,统一维护,满足基础工作需求
---

16 changes: 16 additions & 0 deletions docs/install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 安装
## 1.安装组件
```bash
npm i greatbrick
```
## 2.引用组件
```javascript
// 全部引入
import 'greatbrick/dist/css/index.css'
import GreatBrick from 'greatbrick'
app.use(GreatBrick)
// 按需引入
import 'greatbrick/dist/css/button.css'
import {GButton} from 'greatbrick'
app.use(GButton)
```
3 changes: 1 addition & 2 deletions examples/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import { createApp } from 'vue'
import App from './App.vue'

// Bootstrap
// import 'bootstrap/dist/css/bootstrap.min.css';
import 'bootstrap/dist/css/bootstrap.min.css';
// import 'bootstrap/dist/js/bootstrap.bundle.min.js';
import '../components/css/main.scss'
import '../components/css/index.scss'

import GreatBrick from '../components/lib'
Expand Down
3 changes: 0 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// const gulp = require('gulp')
// const sass = require('gulp-sass')
// const minifyCSS = require('gulp-minigy-css')
import gulp from 'gulp'
import dartSass from 'sass'
import gulpSass from 'gulp-sass'
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "greatbrick",
"version": "0.0.4",
"version": "0.0.5",
"license": "MIT",
"homepage": "https://github.com/greatjiang/greatbrick",
"repository": {
Expand Down Expand Up @@ -44,4 +44,4 @@
"sass": "^1.75.0",
"vite": "^5.2.0"
}
}
}

0 comments on commit dde5b0d

Please sign in to comment.