Skip to content

Commit

Permalink
website: update.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Apr 3, 2023
1 parent 1649376 commit efced7e
Show file tree
Hide file tree
Showing 41 changed files with 710 additions and 348 deletions.
32 changes: 23 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ on:

jobs:
build-deploy:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 16
registry-url: 'https://registry.npmjs.org'

- run: npm i npm@7 -g
# - run: npm ci
- run: npm install
# - run: npm run hoist
Expand All @@ -23,14 +23,14 @@ jobs:

- name: Create Tag
id: create_tag
uses: jaywcjlove/create-tag-action@v1.3.4
uses: jaywcjlove/create-tag-action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
package-path: ./packages/base/package.json

- name: Generate Changelog
id: changelog
uses: jaywcjlove/changelog-generator@v1.4.8
uses: jaywcjlove/changelog-generator@main
if: steps.create_tag.outputs.successful
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -39,7 +39,7 @@ jobs:
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'

- name: Create Release
uses: jaywcjlove/create-tag-action@v1.3.4
uses: jaywcjlove/create-tag-action@main
with:
package-path: ./packages/base/package.json
release: true
Expand All @@ -62,4 +62,18 @@ jobs:
# - uses: JS-DevTools/npm-publish@v1
# with:
# token: ${{ secrets.NPM_TOKEN }}
# package: ./packages/simple/package.json
# package: ./packages/simple/package.json

# - run: npm publish
# name: packages/simple
# working-directory: packages/simple
# continue-on-error: true
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

# - run: npm publish
# name: packages/base
# working-directory: packages/base
# continue-on-error: true
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": true,
"scripts": {
"prepare": "husky install",
"start": "lerna exec \"npm run serve\" --scope website",
"start": "lerna exec \"npm run dev\" --scope website",
"build:website": "lerna exec \"npm run build\" --scope website",
"build": "lerna exec \"tsbb build src/*.tsx --use-babel --use-vue\" --scope @vue-monorepo-template/*",
"watch:simple": "lerna exec \"tsbb watch src/*.tsx --use-babel --use-vue\" --scope @vue-monorepo-template/simple",
Expand Down
2 changes: 0 additions & 2 deletions website/.eslintignore

This file was deleted.

15 changes: 15 additions & 0 deletions website/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')

module.exports = {
root: true,
extends: [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript',
'@vue/eslint-config-prettier/skip-formatting'
],
parserOptions: {
ecmaVersion: 'latest'
}
}
27 changes: 16 additions & 11 deletions website/.gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
.DS_Store
node_modules
/dist


# local env files
.env.local
.env.*.local

# Log files
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
.DS_Store
dist
dist-ssr
coverage
*.local

/cypress/videos/
/cypress/screenshots/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
Expand Down
8 changes: 8 additions & 0 deletions website/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"semi": false,
"tabWidth": 2,
"singleQuote": true,
"printWidth": 100,
"trailingComma": "none"
}
3 changes: 0 additions & 3 deletions website/babel.config.js

This file was deleted.

23 changes: 23 additions & 0 deletions website/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/// <reference types="vite/client" />
declare module '*.md' {
// "unknown" would be more detailed depends on how you structure frontmatter
const attributes: Record<string, unknown>

// When "Mode.TOC" is requested
const toc: { level: string; content: string }[]

// When "Mode.HTML" is requested
const html: string
const markdown: string

// When "Mode.RAW" is requested
const raw: string

// When "Mode.Vue" is requested
import { ComponentOptions, Component } from 'vue'
const VueComponent: ComponentOptions
const VueComponentWith: (components: Record<string, Component>) => ComponentOptions

// Modify below per your usage
export { attributes, toc, html, markdown, VueComponent, VueComponentWith }
}
13 changes: 13 additions & 0 deletions website/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
84 changes: 31 additions & 53 deletions website/package.json
Original file line number Diff line number Diff line change
@@ -1,67 +1,45 @@
{
"name": "website",
"version": "1.0.0",
"description": "简单的 vue 3 包开发工程实例模板 vue-monorepo-template。",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"map": "source-map-explorer dist/js/*.js --html dist/dependencies.html"
"dev": "vite",
"build": "run-p type-check build-only",
"preview": "vite preview",
"test:unit": "vitest",
"build-only": "vite build",
"type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"format": "prettier --write src/"
},
"dependencies": {
"@vue-monorepo-template/simple": "1.0.0",
"@vue-monorepo-template/base": "1.0.0",
"@uivjs/vue-github-corners": "1.0.1",
"@uivjs/vue-markdown-preview": "1.0.3",
"core-js": "^3.6.5",
"vue": "^3.0.0",
"vue-router": "^4.0.0-0"
"vue": "^3.2.47",
"vue-router": "^4.1.6"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-plugin-router": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"@vue/compiler-sfc": "^3.0.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^7.0.0",
"raw-loader": "4.0.2",
"source-map-explorer": "2.5.3"
},
"keywords": [
"vue",
"vue3",
"simple",
"component",
"components",
"vue-monorepo-template",
"ui",
"css",
"uikit",
"vue-ui",
"framework"
],
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/vue3-essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {
"no-debugger": "off"
}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
"@rushstack/eslint-patch": "^1.2.0",
"@types/jsdom": "^21.1.0",
"@types/node": "^18.14.2",
"@vitejs/plugin-vue": "^4.0.0",
"@vitejs/plugin-vue-jsx": "^3.0.0",
"@vue/eslint-config-prettier": "^7.1.0",
"@vue/eslint-config-typescript": "^11.0.2",
"@vue/test-utils": "^2.3.0",
"@vue/tsconfig": "^0.1.3",
"vite-plugin-markdown": "^2.2.0-2",
"style-to-object": "^0.4.1",
"eslint": "^8.34.0",
"eslint-plugin-vue": "^9.9.0",
"jsdom": "^21.1.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.4",
"typescript": "~4.8.4",
"vite": "^4.1.4",
"vitest": "^0.29.1",
"vue-tsc": "^1.2.0"
}
}
Loading

0 comments on commit efced7e

Please sign in to comment.