Skip to content

Commit

Permalink
[2023-09-01] init project and finish basic layout
Browse files Browse the repository at this point in the history
  • Loading branch information
plantree committed Sep 1, 2023
1 parent ebce859 commit e76fba3
Show file tree
Hide file tree
Showing 38 changed files with 4,860 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist
src/assets
public
29 changes: 29 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"root": true,
"globals": {
"__VERSION__": "readonly"
},
"parser": "vue-eslint-parser",
"parserOptions": {
"parser": "@typescript-eslint/parser",
"ecmaVersion": 2020,
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "prettier", "vue"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:vue/vue3-recommended"
],
"rules": {
"no-console": 1, // Means warning
"prettier/prettier": 2, // Means error
"vue/multi-word-component-names": 0,
"vue/no-v-html": 0,
"vue/html-self-closing": 0,
"vue/max-attributes-per-line": 0,
"vue/singleline-html-element-content-newline": 0
}
}
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm run lint-staged
5 changes: 5 additions & 0 deletions .lintstagedrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
'*.{vue,js,jsx,ts,tsx}': 'eslint --fix',
'*.{vue,css,less,scss}': 'stylelint --fix',
'*.{md,json,html}': 'prettier --write'
};
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
dist
src/assets
public
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": true,
"tabWidth": 2,
"singleQuote": true,
"printWidth": 100,
"trailingComma": "none"
}
33 changes: 33 additions & 0 deletions .stylelintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
module.exports = {
extends: ['stylelint-config-recommended'],

plugins: ['stylelint-scss', 'stylelint-order'],

rules: {
'at-rule-no-unknown': null,
'no-irregular-whitespace': null,
'scss/at-rule-no-unknown': [
true,
{
ignoreAtRules: ['tailwind']
}
],
'font-family-no-missing-generic-family-keyword': [
true,
{ ignoreFontFamilies: ['Fallback'] }
],
'selector-pseudo-class-no-unknown': [
true,
{ ignorePseudoClasses: ['deep'] }
]
},

ignoreFiles: ['dist/**/*.css'],

overrides: [
{
files: ['**/*.vue'],
customSyntax: 'postcss-html'
}
]
};
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"eslint.validate": ["javascript", "typescript", "vue"],
"editor.formatOnSave": true
}
3 changes: 3 additions & 0 deletions README-zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ocr-pwa

A simple PWA for OCR, based on Tesseract.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
# ocr-pwa

A simple PWA for OCR, based on Tesseract.

## Preview

## Introduction

## Features

## Resources

## Issues

## License

[MIT](https://opensource.org/licenses/MIT)

Copyright (c) 2023-present, Plantree

- https://daisyui.com/docs/install/
- https://vitejs.dev/
- https://vuejs.org/
Empty file added docs/en-US/guide.md
Empty file.
Empty file added docs/zh-CN/guide.md
Empty file.
14 changes: 14 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>We OCR</title>
</head>

<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
46 changes: 46 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"name": "ocr-pwa",
"version": "0.0.0",
"type": "module",
"scripts": {
"lint": "eslint ./src --ext .js,.jsx,.ts,.tsx,.vue --fix",
"format": "prettier --config .prettierrc src/**/*{.ts,.vue} --write",
"stylelint": "stylelint ./src/**/*.{scss,css,less,vue} --fix",
"lint-staged": "lint-staged",
"dev": "vite",
"build": "vue-tsc && vite build",
"preview": "vite preview",
"prepare": "husky install"
},
"dependencies": {
"vue": "^3.3.4",
"vue-i18n": "9",
"vue-router": "4"
},
"devDependencies": {
"@types/node": "^20.5.7",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.4.1",
"@vitejs/plugin-vue": "^4.2.3",
"autoprefixer": "^10.4.15",
"daisyui": "^3.6.3",
"eslint": "^8.48.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-vue": "^9.17.0",
"husky": "^8.0.3",
"lint-staged": "^14.0.1",
"naive-ui": "^2.34.4",
"postcss": "^8.4.28",
"postcss-html": "^1.5.0",
"prettier": "^3.0.2",
"stylelint": "^15.10.3",
"stylelint-config-standard": "^34.0.0",
"stylelint-order": "^6.0.3",
"stylelint-scss": "^5.1.0",
"tailwindcss": "^3.3.3",
"typescript": "^5.0.2",
"vite": "^4.4.5",
"vue-tsc": "^1.8.5"
}
}
Loading

0 comments on commit e76fba3

Please sign in to comment.