Skip to content

Commit

Permalink
chore: 重构项目结构-适配Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Mar 11, 2023
1 parent 2bf90eb commit 76c6fa7
Show file tree
Hide file tree
Showing 13 changed files with 1,236 additions and 56 deletions.
29 changes: 29 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,35 @@ updates:
prefix: fix
prefix-development: chore
include: scope
- package-ecosystem: npm
directory: "/apps/theme"
schedule:
interval: daily
time: "00:00"
open-pull-requests-limit: 10
reviewers:
- terwer
assignees:
- terwer
commit-message:
prefix: fix
prefix-development: chore
include: scope
- package-ecosystem: npm
directory: "/apps/blog"
schedule:
interval: daily
time: "00:00"
open-pull-requests-limit: 10
reviewers:
- terwer
assignees:
- terwer
commit-message:
prefix: fix
prefix-development: chore
include: scope

# Fetch and update latest `github-actions` pkgs
- package-ecosystem: github-actions
directory: "/"
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ zhi 系列生态
├── apps
│   ├── blog 博客根目录
│   │   ├── dist 博客预览入口
│   │   ├── app.vue 博客源码入口
│   │   ├── app.styl 主题styl源码入口
│   └── theme 主题根目录
│   ├── theme.ts 主题ts源码入口
│   ├── theme.styl 主题styl源码入口
Expand Down
28 changes: 28 additions & 0 deletions apps/blog/app.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright (c) 2023, Terwer . All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Terwer designates this
* particular file as subject to the "Classpath" exception as provided
* by Terwer in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com
* or visit www.terwer.space if you need additional information or have any
* questions.
*/
body
background blue
font-size 14px

14 changes: 10 additions & 4 deletions apps/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,33 @@
"version": "1.0.0",
"description": "zhi blog module",
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"watch:css": "stylus --watch app.styl --out ./public/app.css",
"build": "pnpm build:css && pnpm build:js",
"build:css": "stylus --compress app.styl --out ./public/app.css",
"build:js": "nuxt build",
"dev": "pnpm build:css && nuxt dev",
"generate": "pnpm build:css && nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare",
"lint": "eslint --ext .ts .",
"lint:fix": "eslint --fix --ext .ts .",
"prettier": "prettier --write ."
},
"dependencies": {
"zhi-log": "^1.5.5"
},
"devDependencies": {
"@nuxtjs/eslint-config-typescript": "^12.0.0",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.7.0",
"eslint-plugin-prettier": "^4.2.1",
"nuxt": "^3.2.3",
"prettier": "^2.8.4",
"stylus": "^0.59.0",
"typescript": "^4.9.5",
"vite-plugin-eslint": "^1.8.1",
"vue-tsc": "^1.2.0"
},
"dependencies": {},
"keywords": [
"zhi",
"blog"
Expand Down
76 changes: 63 additions & 13 deletions apps/blog/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/blog/public/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
body{background:#00f;font-size:14px}
35 changes: 35 additions & 0 deletions apps/theme/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
module.exports = {
root: true,

env: {
browser: true,
node: true,
es2021: true,
},

parser: "@typescript-eslint/parser",

parserOptions: {
ecmaVersion: 12,
sourceType: "module",
tsconfigRootDir: __dirname,
parser: "@typescript-eslint/parser",
project: ["./tsconfig.json"],
extraFileExtensions: [".vue"],
},

plugins: ["@typescript-eslint", "prettier"],

extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
],

rules: {
// Note: you must disable the base rule as it can report incorrect errors
semi: "off",
quotes: "off",
"prettier/prettier": "error"
},
}
1 change: 1 addition & 0 deletions apps/theme/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shamefully-hoist=true
13 changes: 13 additions & 0 deletions apps/theme/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# platform
.nuxt
.output

# Ignore artifacts:
dist
node_modules

# Ignore all HTML files:
*.html

# lib
/pnpm-lock.yaml
Loading

0 comments on commit 76c6fa7

Please sign in to comment.