-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b55212e
Showing
43 changed files
with
2,687 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Build app and deploy to aliyun | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- name: npm install | ||
run: npm install | ||
# 运行构建脚本 | ||
- name: Build VitePress site | ||
run: npm run docs:build | ||
# 部署到阿里云 | ||
- name: Deploy to Aliyun | ||
uses: easingthemes/ssh-deploy@main | ||
env: | ||
# 私钥 | ||
SSH_PRIVATE_KEY: ${{ secrets.BSF_SERVER_SECRET }} | ||
# scp参数 | ||
ARGS: "-avzr --delete" | ||
# 源目录,编译后生成的文件目录 | ||
SOURCE: "./docs/.vitepress/dist/" | ||
# 服务器ip:换成你的服务器IP | ||
REMOTE_HOST: "${{ secrets.BSF_SERVER_HOST }}" | ||
# 用户 | ||
REMOTE_USER: "root" | ||
# 目标地址 你在服务器上部署代码的地方 | ||
TARGET: "/www/byteee-fund-docs/cordova-plugin-barcode-scanner" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
docs/.vitepress/cache | ||
node_modules | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
English | [中文](README_zh.md) | ||
|
||
|
||
# About the Project | ||
|
||
`cordova-plugin-barcode-scanner` is a Cordova plugin based on ZXing, designed for scanning QR codes, 1D barcodes, and other barcode formats. | ||
|
||
- [Home Page](https://byteee.fund/project/cordova-plugin-barcode-scanner) | ||
- [Documentation](https://byteee.fund/doc/cordova-plugin-barcode-scanner/) | ||
- [DEMO](https://github.com/byteee-fund/cordova-plugin-barcode-scanner-demo) | ||
|
||
## SDK Versions | ||
|
||
- Cordova 12.x | ||
- zxing-android-embedded: 4.3.0 | ||
- ZXingObjC: 3.6.9 | ||
|
||
## Features | ||
|
||
- ✅ Single scan | ||
- ✅ Continuous scan | ||
- ✅ UI customization support | ||
|
||
## Compatibility | ||
|
||
- ✅ Cordova | ||
- ✅ Ionic/Capacitor | ||
|
||
## License | ||
|
||
Apache 2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
[English](README.md) | 中文 | ||
|
||
# 关于项目 | ||
|
||
`cordova-plugin-barcode-scanner` 是一款基于Zxing实现的二维码,一维码/条形码的cordova插件,。 | ||
|
||
|
||
- [主页](https://byteee.fund/project/cordova-plugin-barcode-scanner) | ||
|
||
- [文档](https://byteee.fund/doc/cordova-plugin-barcode-scanner/) | ||
|
||
- [DEMO](https://github.com/byteee-fund/cordova-plugin-barcode-scanner-demo) | ||
|
||
|
||
## SDK版本 | ||
|
||
- Cordova 12.x | ||
- zxing-android-embedded:4.3.0 | ||
- ZXingObjC 3.6.9 | ||
|
||
|
||
|
||
## 功能列表 | ||
|
||
- ✅ 单次扫码 | ||
|
||
- ✅ 连续扫码 | ||
|
||
- ✅ 支持界面定制 | ||
|
||
|
||
|
||
## 兼容性 | ||
|
||
- ✅ Cordova | ||
- ✅ Ionic/Capacitor | ||
|
||
## 软件协议 | ||
|
||
Apache 2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { defineConfig } from 'vitepress' | ||
import { | ||
navbarEn, | ||
navbarZh, | ||
sidebarEn, | ||
sidebarZh, | ||
} from "./configs"; | ||
|
||
// https://vitepress.dev/reference/site-config | ||
export default defineConfig({ | ||
title: "cordova-plugin-barcode-scanner", | ||
description: "cordova plugin for barcode scanner ", | ||
base: "/doc/cordova-plugin-barcode-scanner", | ||
themeConfig: { | ||
search: { | ||
provider: 'local' | ||
}, | ||
socialLinks: [ | ||
{ icon: {svg:"<svg class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"16068\" width=\"200\" height=\"200\"><path d=\"M512 901.746939c-13.583673 0-26.122449-4.179592-37.093878-13.061225-8.881633-7.314286-225.697959-175.020408-312.424489-311.379592C133.746939 532.37551 94.040816 471.24898 94.040816 384.522449c0-144.718367 108.146939-262.269388 240.326531-262.269388 67.395918 0 131.657143 30.82449 177.632653 84.636735 45.453061-54.334694 109.191837-84.636735 177.110204-84.636735 132.702041 0 240.326531 117.55102 240.326531 262.269388 0 85.159184-37.093878 143.673469-67.395919 191.216327l-1.044898 1.567346c-86.726531 136.359184-303.542857 304.587755-312.424489 311.379592-10.44898 8.359184-22.987755 13.061224-36.571429 13.061225z\" fill=\"#E5404F\" ></path></svg>"}, link: 'https://byteee.fund/project/cordova-plugin-barcode-scanner' }, | ||
{ icon: 'github', link: 'https://github.com/byteee-fund/cordova-plugin-barcode-scanner-doc' } | ||
], | ||
footer: { | ||
message: 'Apache 2.0 License.', | ||
copyright: 'Copyright © 2024. <a href="https://byteee.fund" target="_blank">BSF</a>' | ||
} | ||
}, | ||
locales: { | ||
root: { | ||
label: 'English', | ||
lang: 'en', | ||
themeConfig: { | ||
nav: navbarEn, | ||
sidebar:sidebarEn | ||
} | ||
}, | ||
zh: { | ||
label: '中文', | ||
lang: 'zh', | ||
themeConfig: { | ||
nav: navbarZh, | ||
sidebar:sidebarZh | ||
} | ||
}, | ||
}, | ||
lastUpdated: true | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './navbar' | ||
export * from './sidebar' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { DefaultTheme } from "vitepress" | ||
type NavItem = DefaultTheme.NavItem | ||
|
||
export const navbarEn: NavItem[] = [ | ||
{ | ||
text: 'Guide', | ||
link: "/guide" | ||
}, | ||
{ | ||
text: 'API', | ||
items: [ | ||
{ | ||
text: "Scan", | ||
link: "/api/login.md" | ||
}, | ||
{ | ||
text: "StopScan", | ||
link: "/api/stop-scan.md" | ||
} | ||
], | ||
}, | ||
{ | ||
text: 'Capacitor/Ionic', | ||
link: "/guide/capacitor.md" | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './en' | ||
export * from './zh' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { DefaultTheme } from "vitepress" | ||
type NavItem = DefaultTheme.NavItem | ||
|
||
export const navbarZh: NavItem[] = [ | ||
{ | ||
text: '指南', | ||
link: "/zh/guide/index.md" | ||
}, | ||
{ | ||
text: 'API', | ||
items: [ | ||
{ | ||
text: "扫码(scan)", | ||
link: "/zh/api/scan.md" | ||
}, | ||
{ | ||
text: "停止扫码(stopScan)", | ||
link: "/zh/api/stop-scan.md" | ||
} | ||
], | ||
}, | ||
{ | ||
text: 'Capacitor/Ionic', | ||
link: "/zh/guide/capacitor.md" | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { DefaultTheme } from "vitepress" | ||
type Sidebar = DefaultTheme.Sidebar | ||
|
||
export const sidebarEn: Sidebar = { | ||
'/guide': [ | ||
{ | ||
text: 'Guide', | ||
items: [ | ||
{text: "About", link: "/guide/index.md"}, | ||
{text: "Quickstart", link: "/guide/quickstart.md"}, | ||
{text: "Capacitor/Ionic", link: "/guide/capacitor.md"}, | ||
{text: "Troubleshooting", link: "/guide/troubleshooting.md"}, | ||
{text: "Errcode", link: "/guide/errcode.md"}, | ||
{text: "Changelog", link: "/guide/changelog.md"}, | ||
{text: "Thanks", link: "/guide/thanks.md"} | ||
], | ||
}, | ||
], | ||
'/api/': [ | ||
{ | ||
text: 'API', | ||
items: [ | ||
{ | ||
text: "Scan", | ||
link: "/api/scan.md" | ||
}, | ||
{ | ||
text: "StopScan", | ||
link: "/api/stop-scan.md" | ||
}, | ||
], | ||
}, | ||
], | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './en' | ||
export * from './zh' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { DefaultTheme } from "vitepress" | ||
type Sidebar = DefaultTheme.Sidebar | ||
|
||
export const sidebarZh: Sidebar = { | ||
'/zh/guide/': [ | ||
{ | ||
text: '指南', | ||
items: [ | ||
{text: "关于", link: "/zh/guide/index.md"}, | ||
{text: "快速开始", link: "/zh/guide/quickstart.md"}, | ||
{text: "Capacitor/Ionic", link: "/zh/guide/capacitor.md"}, | ||
{text: "常见问题", link: "/zh/guide/troubleshooting.md"}, | ||
{text: "错误码", link: "/zh/guide/errcode.md"}, | ||
{text: "更新日志", link: "/zh/guide/changelog.md"}, | ||
{text: "特别鸣谢", link: "/zh/guide/thanks.md"} | ||
], | ||
}, | ||
], | ||
'/zh/api/': [ | ||
{ | ||
text: 'API', | ||
items: [ | ||
{ | ||
text: "扫码(scan)", | ||
link: "/zh/api/scan.md" | ||
}, | ||
{ | ||
text: "停止扫码(stopScan)", | ||
link: "/zh/api/stop-scan.md" | ||
} | ||
], | ||
}, | ||
], | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!-- docs/.vitepress/theme/Layout.vue --> | ||
<script setup lang="ts"> | ||
import DefaultTheme from 'vitepress/theme' | ||
import {inBrowser, useData} from 'vitepress' | ||
import { watchEffect } from 'vue' | ||
|
||
const { lang } = useData() | ||
watchEffect(() => { | ||
if (inBrowser) { | ||
document.cookie = `nf_lang=${lang.value}; expires=Mon, 1 Jan 2030 00:00:00 UTC; path=/` | ||
} | ||
}) | ||
</script> | ||
|
||
<template> | ||
<DefaultTheme.Layout /> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// docs/.vitepress/theme/index.ts | ||
import DefaultTheme from 'vitepress/theme' | ||
import Layout from './Layout.vue' | ||
|
||
export default { | ||
extends: DefaultTheme, | ||
Layout | ||
} |
Oops, something went wrong.