Skip to content

Commit

Permalink
chore: monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
yue1123 committed Nov 22, 2022
1 parent 83e816c commit 7e72140
Show file tree
Hide file tree
Showing 19 changed files with 181 additions and 153 deletions.
1 change: 0 additions & 1 deletion docs/.vitepress/head.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const heads: HeadConfig[] = [
],
['meta', { name: 'msapplication-TileColor', content: '#3eaf7c' }],
['meta', { name: 'theme-color', content: '#3eaf7c' }],
['script', { src: '/vue3-baidu-map-gl/lib/tilt.min.js' }]
]

if (process.env.NODE_ENV === 'production') {
Expand Down
21 changes: 19 additions & 2 deletions docs/.vitepress/styles/main.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
:root {
--vp-layout-max-width: 1620px;
}
/* --vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: -webkit-linear-gradient(120deg, ##fff 30%, #fff);
--vp-home-hero-image-background-image: linear-gradient(-45deg, #fff 50%, #fff 50%);
--vp-home-hero-image-filter: blur(40px); */
}

/* .image-bg {
position: absolute;
top: 50%;
left: 50%;
border-radius: 50%;
width: 192px;
height: 192px;
background-image: var(--vp-home-hero-image-background-image);
filter: var(--vp-home-hero-image-filter);
transform: translate(-50%, -50%);
} */

.dark [img-light] {
display: none;
}
Expand All @@ -22,7 +39,7 @@ img.resizable-img {
height: unset;
}

.vp-doc td{
.vp-doc td {
font-size: 14px !important;
}

Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { watch } from 'vue'
import defaultTheme from 'vitepress/theme'
import baiduMapInit from '../../../packages/index'
import baiduMapInit from 'vue3-baidu-map-gl'
import '../styles/main.css'

export default {
Expand Down
2 changes: 2 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ hero:
src: /logo.png
alt: Vue3 BaiduMap GL
id: J_index_logo
width: 240
actions:
- theme: brand
text: 开始使用
Expand Down Expand Up @@ -46,6 +47,7 @@ features:
---

<script>
import VanillaTilt from 'vanilla-tilt';
if(typeof window !== 'undefined'){
window.onload = function () {
const element = document.getElementById('J_index_logo')
Expand Down
16 changes: 16 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"private": true,
"scripts": {
"dev": "vitepress dev .",
"build": "prettier -w ./zh/* && vitepress build .",
"fix-dot": "fixdot docs/zh/base/* docs/zh/control/* docs/zh/guide/* docs/zh/overlay/* docs/index.md -d -p",
"format": "prettier -w types/* docs/zh/* packages/*"
},
"devDependencies": {
"vanilla-tilt": "^1.7.3",
"vue3-baidu-map-gl": "workspace:*"
},
"dependencies": {
"vitepress": "1.0.0-alpha.27"
}
}
Binary file added docs/public/logo_bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions docs/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConfig } from 'vite'

export default defineConfig({
server: {
fs: {
// Allow serving files from one level up to the project root
allow: ['..']
}
}
})
2 changes: 1 addition & 1 deletion docs/zh/hooks/useAddressGeocoder.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { useAddressGeocoder } from 'vue3-baidu-map-gl'

<script lang="ts" setup>
import { ref, watch } from 'vue'
import { useAddressGeocoder } from '../../../packages'
import { useAddressGeocoder } from 'vue3-baidu-map-gl'
const map = ref()
const addressList = ref([
{
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/hooks/useBrowserLocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import { useBrowserLocation } from 'vue3-baidu-map-gl'

<script lang="ts" setup>
import { ref } from 'vue'
import { useBrowserLocation } from '../../../packages'
import { useBrowserLocation } from 'vue3-baidu-map-gl'
const map = ref()
const { get, location, isLoading, isError, status } = useBrowserLocation(null, () => {
map.value.resetCenter()
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/hooks/useIpLocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { useIpLocation } from 'vue3-baidu-map-gl'

<script lang="ts" setup>
import { ref } from 'vue'
import { useIpLocation } from '../../../packages'
import { useIpLocation } from 'vue3-baidu-map-gl'
const map = ref()
const { get, location, isLoading } = useIpLocation(() => {
map.value.resetCenter()
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/hooks/usePointGeocoder.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { usePointGeocoder } from 'vue3-baidu-map-gl'

<script lang="ts" setup>
import { ref, watch } from 'vue'
import { usePointGeocoder } from '../../../packages'
import { usePointGeocoder } from 'vue3-baidu-map-gl'
const map = ref()
const { get, result, isLoading, isEmpty } = usePointGeocoder()
const point = { lng: 116.30793520652882, lat: 40.05861561613348 }
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/hooks/useTrackAnimation.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import { useTrackAnimation } from 'vue3-baidu-map-gl'

<script setup lang="ts">
import { ref } from 'vue'
import { useTrackAnimation } from '../../../packages/hooks/useTrackAnimation'
import { useTrackAnimation } from 'vue3-baidu-map-gl'
const map = ref(null)
const {
setPath,
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/hooks/useViewAnimation.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import { useViewAnimation } from 'vue3-baidu-map-gl'

<script setup lang="ts">
import { ref } from 'vue'
import { useViewAnimation } from '../../../packages/hooks/useViewAnimation'
import { useViewAnimation } from 'vue3-baidu-map-gl'
const map = ref(null)
const {
viewAnimation,
Expand Down
1 change: 1 addition & 0 deletions docs/zh/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ features:
---

<script>
import VanillaTilt from 'vanilla-tilt';
if(typeof window !== 'undefined'){
window.onload = function () {
const element = document.getElementById('J_index_logo')
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/overlay/polygon.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ import { Polygon } from 'vue3-baidu-map-gl'

<script setup lang="ts">
import { ref, watch } from 'vue'
import { useAreaBoundary } from '../../../packages/index.ts'
import { useAreaBoundary } from 'vue3-baidu-map-gl'
const zoom = ref<number>(11)
const area = ref<string>('顺义区')
const areaZoomMap = {
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/overlay/prism.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { Prism } from 'vue3-baidu-map-gl'

<script setup lang="ts">
import { ref, watch } from 'vue'
import { useAreaBoundary } from '../../../packages/index.ts'
import { useAreaBoundary } from 'vue3-baidu-map-gl'
const topFillOpacity = ref<number>(0.5)
const area = ref<string>('北京市')
const { isLoading, boundaries: point, get } = useAreaBoundary()
Expand Down
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,12 @@
],
"scripts": {
"clean": "rimraf es dist",
"dev": "pnpm clean && rollup -c",
"dev": "rollup -c --environment NODE_ENV:production && rollup -c ./scripts/build-package.js -w",
"build": "pnpm clean && vue-tsc && rollup -c --environment NODE_ENV:production && rollup -c ./scripts/build-package.js && rimraf *.tsbuildinfo && pnpm gen-volar-dts",
"docs:dev": "vitepress dev docs",
"test": "vitest",
"docs:build": "prettier -w docs/zh/* && vitepress build docs",
"link:pnpm": "pnpm link --global",
"fix-dot": "fixdot docs/zh/base/* docs/zh/control/* docs/zh/guide/* docs/zh/overlay/* docs/index.md -d -p",
"docs:dev": "pnpm run -C docs dev",
"docs:build": "pnpm run build && pnpm run -C docs build",
"gen-volar-dts": "esbuild scripts/gen-component-declaration.js --bundle --platform=node | node",
"format": "prettier -w types/* docs/zh/* packages/*"
},
Expand Down Expand Up @@ -73,7 +72,6 @@
"tslib": "^2.4.0",
"typescript": "^4.6.3",
"vite": "3.1.8",
"vitepress": "1.0.0-alpha.27",
"vue-tsc": "^1.0.0"
},
"sideEffects": false,
Expand Down
Loading

0 comments on commit 7e72140

Please sign in to comment.