-
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 status checks…
feat: first commit
0 parents
commit dcb764b
Showing
24 changed files
with
569 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,25 @@ | ||
name: Malagu Deploy | ||
|
||
on: push | ||
|
||
jobs: | ||
malagu-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12' | ||
- uses: bahmutov/npm-install@v1 | ||
- run: npm run lint --if-present | ||
- run: npm test | ||
- if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' }} | ||
env: ${{ secrets }} | ||
run: npx malagu deploy -m prod | ||
- if: ${{ github.ref == 'refs/heads/pre' }} | ||
env: ${{ secrets }} | ||
run: npx malagu deploy -m pre | ||
- if: ${{ github.ref != 'refs/heads/master' && github.ref == 'refs/heads/main' && github.ref != 'refs/heads/pre' }} | ||
env: ${{ secrets }} | ||
run: npx malagu deploy -m test |
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 @@ | ||
node_modules | ||
.malagu |
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 @@ | ||
{ | ||
"printWidth": 150 | ||
} |
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,23 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Malagu Debug", | ||
"request": "launch", | ||
"runtimeArgs": [ | ||
"malagu", | ||
"serve" | ||
], | ||
"runtimeExecutable": "npx", | ||
"skipFiles": [ | ||
"<node_internals>/**" | ||
], | ||
"env": { | ||
"NODE_ENV": "development" | ||
}, | ||
"internalConsoleOptions": "openOnSessionStart", | ||
"outputCapture": "std", | ||
"type": "pwa-node" | ||
} | ||
] | ||
} |
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,92 @@ | ||
# 开发说明 | ||
|
||
## 安装依赖 | ||
|
||
以下使用 yarn 工具来说明,你也可以使用 npm。 | ||
|
||
```bash | ||
# 通过 malagu init 初始化应用的时候已经自动安装了依赖,所以你只需要安装你额外需要的依赖即可 | ||
|
||
$ yarn add xxxx | ||
``` | ||
|
||
## 本地运行 | ||
|
||
```shell | ||
# 启动本地服务,端口默认 3000 | ||
# 在终端中会输出本地服务的 URL 链接 | ||
|
||
$ yarn start # 或者执行 malagu serve 命令 | ||
``` | ||
|
||
## 构建部署 | ||
|
||
模板默认提供了四套隔离环境:本地(local)、测试(test)、预发(pre)、线上(prod)。每个环境对应着一个 malagu 配置文件(可选),类似 malagu-test.yml。而 malagu.yml 文件一般用于放所有环境的公共配置。第一次部署的时候可能会提示你填写相关云厂商 ak 信息。如果是 Vercel 云平台的模板,会提示你需要登录到 Vercel 平台。你也可以在项目通过 .env 提供云厂商的 ak 信息。 | ||
|
||
```bash | ||
|
||
$ malagu deploy -m scf # 部署到腾讯云函数测试环境 | ||
$ malagu deploy -m scf -m test # 部署到腾讯云测试环境 | ||
$ malagu deploy -m scf -m pre # 部署到腾讯云预发环境 | ||
$ malagu deploy -m scf -m prod # 部署到腾讯云线上环境 | ||
|
||
``` | ||
|
||
## 关于 Malagu Framework | ||
|
||
Malagu 是基于 TypeScript 的 Serverless First、组件化、平台无关的渐进式应用框架。 | ||
|
||
## 特征 | ||
|
||
- 约定大于配置,零配置,开箱即用 | ||
- TypeScript 版 Spring Boot | ||
- Serverless First | ||
- 平台不锁定 | ||
- 支持前后端一体化,前端框架不锁定 | ||
- 支持微服务 | ||
- 组件化,渐进式 | ||
- 命令行工具插件化 | ||
- 依赖注入 | ||
- 面向切面编程(AOP) | ||
- 集成了流行的 ORM 框架,使用装饰器声明式事务管理 | ||
- 支持 OIDC 认证 | ||
- 支持 OAuth2 授权 | ||
- 使用 rxjs 管理状态 | ||
- 提供 REST 和 RPC 两种接口风格 | ||
|
||
Malagu 名字由来:在我的家乡,谐音“吗啦咕”是小石头的意思,小石头堆砌起来可以建成高楼大厦、道路桥梁,而 Malagu 组件编排可以实现千变万化的应用。 | ||
|
||
## 快速开始 | ||
|
||
```bash | ||
# 安装命令行工具 | ||
npm install -g @malagu/cli | ||
|
||
# 初始化 | ||
malagu init -o project-name | ||
cd project-name # 进入项目根目录 | ||
|
||
# 运行 | ||
malagu serve | ||
|
||
# 部署 | ||
malagu deploy | ||
``` | ||
|
||
[](https://asciinema.org/a/474104?speed=2.5&autoplay=1) | ||
|
||
### 文档 | ||
|
||
- [介绍](https://malagu.cellbang.com/guide/%E4%BB%8B%E7%BB%8D) | ||
- [创建第一个应用](https://malagu.cellbang.com/guide/%E5%88%9B%E5%BB%BA%E7%AC%AC%E4%B8%80%E4%B8%AA%E5%BA%94%E7%94%A8) | ||
- [命令行工具](https://malagu.cellbang.com/guide/%E5%91%BD%E4%BB%A4%E8%A1%8C%E5%B7%A5%E5%85%B7) | ||
- [控制器](https://malagu.cellbang.com/guide/%E6%8E%A7%E5%88%B6%E5%99%A8) | ||
- [数据库操作](https://malagu.cellbang.com/guide/%E6%95%B0%E6%8D%AE%E5%BA%93typeorm) | ||
- [微服务](https://malagu.cellbang.com/dev/%E5%BE%AE%E6%9C%8D%E5%8A%A1) | ||
- [认证与授权](https://malagu.cellbang.com/guide/%E8%AE%A4%E8%AF%81%E4%B8%8E%E6%8E%88%E6%9D%83) | ||
- [云平台适配](https://malagu.cellbang.com/cloud/%E4%BA%91%E5%B9%B3%E5%8F%B0%E9%80%82%E9%85%8D) | ||
- [依赖注入](https://malagu.cellbang.com/guide/%E4%BE%9D%E8%B5%96%E6%B3%A8%E5%85%A5) | ||
- [组件设计](https://malagu.cellbang.com/guide/%E7%BB%84%E4%BB%B6%E8%AE%BE%E8%AE%A1) | ||
- [前端架构](https://malagu.cellbang.com/guide/%E5%89%8D%E7%AB%AF%E6%9E%B6%E6%9E%84) | ||
- [React 开发](https://malagu.cellbang.com/dev/react) | ||
- [前后端一体化开发](https://malagu.cellbang.com/dev/%E5%89%8D%E5%90%8E%E7%AB%AF%E4%B8%80%E4%BD%93%E5%8C%96%E5%BC%80%E5%8F%91) |
Binary file not shown.
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,16 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" | ||
/> | ||
<meta http-equiv="X-UA-Compatible" content="edge" /> | ||
<meta name="renderer" content="webkit" /> | ||
<meta charset="UTF-8" /> | ||
<title><%= malagu.name %></title> | ||
</head> | ||
<body> | ||
<div id="<%= malagu.hostDomId %>"></div> | ||
</body> | ||
</html> |
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 @@ | ||
malagu: | ||
hostDomId: app |
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 @@ | ||
{ | ||
"name": "bili_watch", | ||
"keywords": [ | ||
"malagu-component" | ||
], | ||
"version": "0.0.0", | ||
"license": "MIT", | ||
"files": [ | ||
"lib", | ||
"src" | ||
], | ||
"dependencies": { | ||
"@malagu/cli-service": "^2.55.0", | ||
"@malagu/core": "2.49.10", | ||
"@malagu/rpc": "2.49.10", | ||
"@malagu/serve-static": "2.49.10", | ||
"@malagu/vue": "2.49.10", | ||
"@unocss/preset-uno": "^0.58.5", | ||
"@unocss/webpack": "^0.58.5", | ||
"@vue/tsconfig": "^0.5.1", | ||
"less": "^4.2.0", | ||
"pinia": "^2.1.7", | ||
"unocss": "^0.58.5", | ||
"vue": "^3.3.4", | ||
"vue-facing-decorator": "^3.0.4", | ||
"vue-router": "^4.2.4" | ||
}, | ||
"devDependencies": { | ||
"@malagu/cli": "2.49.10" | ||
}, | ||
"scripts": { | ||
"clean": "rimraf lib dist .malagu", | ||
"build": "malagu build", | ||
"start": "malagu serve", | ||
"deploy": "malagu deploy -m scf -m test", | ||
"deploy:test": "malagu deploy -m scf -m test", | ||
"deploy:pre": "malagu deploy -m scf -m pre", | ||
"deploy:prod": "malagu deploy -m scf -m prod" | ||
} | ||
} |
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 @@ | ||
import { Component, TSX, Vue } from "vue-facing-decorator"; | ||
|
||
@Component({ | ||
render() { | ||
return ( | ||
<div class="h-screen w-screen flex flex-col justify-center items-center text-center"> | ||
<h1>Malagu Rpc + Vue 3 + Vue Router + Pinia + Vue Decorator + TSX + UNOCSS + Less</h1> | ||
<hr /> | ||
<p> | ||
Powered by <a href="">Zero</a> | ||
</p> | ||
<p>Notice: This template support bun, but malagu isn't support pnpm, so recommend use bun in project.</p> | ||
</div> | ||
); | ||
}, | ||
}) | ||
export default class RootView extends TSX()(Vue) {} |
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,5 @@ | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
text-decoration: none; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,10 @@ | ||
import "uno.css"; | ||
import "./assets/global.less"; | ||
import { createApp } from "vue"; | ||
import { App } from "@malagu/vue"; | ||
import { router } from "./router"; | ||
import { createPinia } from "pinia"; | ||
import RootView from "./Root.view"; | ||
|
||
@App(createApp(RootView).use(router).use(createPinia())) | ||
export default class {} |
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,4 @@ | ||
import "./main"; | ||
import { autoBind } from "@malagu/core"; | ||
|
||
export default autoBind(); |
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,6 @@ | ||
import { createRouter, createWebHashHistory } from "vue-router"; | ||
|
||
export const router = createRouter({ | ||
history: createWebHashHistory(), | ||
routes: [], | ||
}); |
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,232 @@ | ||
// CSS modules | ||
type CSSModuleClasses = { readonly [key: string]: string }; | ||
|
||
declare module "*.module.css" { | ||
const classes: CSSModuleClasses; | ||
export default classes; | ||
} | ||
declare module "*.module.scss" { | ||
const classes: CSSModuleClasses; | ||
export default classes; | ||
} | ||
declare module "*.module.sass" { | ||
const classes: CSSModuleClasses; | ||
export default classes; | ||
} | ||
declare module "*.module.less" { | ||
const classes: CSSModuleClasses; | ||
export default classes; | ||
} | ||
declare module "*.module.styl" { | ||
const classes: CSSModuleClasses; | ||
export default classes; | ||
} | ||
declare module "*.module.stylus" { | ||
const classes: CSSModuleClasses; | ||
export default classes; | ||
} | ||
declare module "*.module.pcss" { | ||
const classes: CSSModuleClasses; | ||
export default classes; | ||
} | ||
declare module "*.module.sss" { | ||
const classes: CSSModuleClasses; | ||
export default classes; | ||
} | ||
|
||
// CSS | ||
declare module "*.css" {} | ||
declare module "*.scss" {} | ||
declare module "*.sass" {} | ||
declare module "*.less" {} | ||
declare module "*.styl" {} | ||
declare module "*.stylus" {} | ||
declare module "*.pcss" {} | ||
declare module "*.sss" {} | ||
|
||
// Built-in asset types | ||
// see `src/node/constants.ts` | ||
|
||
// images | ||
declare module "*.apng" { | ||
const src: string; | ||
export default src; | ||
} | ||
declare module "*.png" { | ||
const src: string; | ||
export default src; | ||
} | ||
declare module "*.jpg" { | ||
const src: string; | ||
export default src; | ||
} | ||
declare module "*.jpeg" { | ||
const src: string; | ||
export default src; | ||
} | ||
declare module "*.jfif" { | ||
const src: string; | ||
export default src; | ||
} | ||
declare module "*.pjpeg" { | ||
const src: string; | ||
export default src; | ||
} | ||
declare module "*.pjp" { | ||
const src: string; | ||
export default src; | ||
} | ||
declare module "*.gif" { | ||
const src: string; | ||
export default src; | ||
} | ||
declare module "*.svg" { | ||
const src: string; | ||
export default src; | ||
} | ||
declare module "*.ico" { | ||
const src: string; | ||
export default src; | ||
} | ||
declare module "*.webp" { | ||
const src: string; | ||
export default src; | ||
} | ||
declare module "*.avif" { | ||
const src: string; | ||
export default src; | ||
} | ||
|
||
// media | ||
declare module "*.mp4" { | ||
const src: string; | ||
export default src; | ||
} | ||
declare module "*.webm" { | ||
const src: string; | ||
export default src; | ||
} | ||
declare module "*.ogg" { | ||
const src: string; | ||
export default src; | ||
} | ||
declare module "*.mp3" { | ||
const src: string; | ||
export default src; | ||
} | ||
declare module "*.wav" { | ||
const src: string; | ||
export default src; | ||
} | ||
declare module "*.flac" { | ||
const src: string; | ||
export default src; | ||
} | ||
declare module "*.aac" { | ||
const src: string; | ||
export default src; | ||
} | ||
declare module "*.opus" { | ||
const src: string; | ||
export default src; | ||
} | ||
declare module "*.mov" { | ||
const src: string; | ||
export default src; | ||
} | ||
|
||
// fonts | ||
declare module "*.woff" { | ||
const src: string; | ||
export default src; | ||
} | ||
declare module "*.woff2" { | ||
const src: string; | ||
export default src; | ||
} | ||
declare module "*.eot" { | ||
const src: string; | ||
export default src; | ||
} | ||
declare module "*.ttf" { | ||
const src: string; | ||
export default src; | ||
} | ||
declare module "*.otf" { | ||
const src: string; | ||
export default src; | ||
} | ||
|
||
// other | ||
declare module "*.webmanifest" { | ||
const src: string; | ||
export default src; | ||
} | ||
declare module "*.pdf" { | ||
const src: string; | ||
export default src; | ||
} | ||
declare module "*.txt" { | ||
const src: string; | ||
export default src; | ||
} | ||
|
||
// wasm?init | ||
declare module "*.wasm?init" { | ||
const initWasm: (options?: WebAssembly.Imports) => Promise<WebAssembly.Instance>; | ||
export default initWasm; | ||
} | ||
|
||
// web worker | ||
declare module "*?worker" { | ||
const workerConstructor: { | ||
new (options?: { name?: string }): Worker; | ||
}; | ||
export default workerConstructor; | ||
} | ||
|
||
declare module "*?worker&inline" { | ||
const workerConstructor: { | ||
new (options?: { name?: string }): Worker; | ||
}; | ||
export default workerConstructor; | ||
} | ||
|
||
declare module "*?worker&url" { | ||
const src: string; | ||
export default src; | ||
} | ||
|
||
declare module "*?sharedworker" { | ||
const sharedWorkerConstructor: { | ||
new (options?: { name?: string }): SharedWorker; | ||
}; | ||
export default sharedWorkerConstructor; | ||
} | ||
|
||
declare module "*?sharedworker&inline" { | ||
const sharedWorkerConstructor: { | ||
new (options?: { name?: string }): SharedWorker; | ||
}; | ||
export default sharedWorkerConstructor; | ||
} | ||
|
||
declare module "*?sharedworker&url" { | ||
const src: string; | ||
export default src; | ||
} | ||
|
||
declare module "*?raw" { | ||
const src: string; | ||
export default src; | ||
} | ||
|
||
declare module "*?url" { | ||
const src: string; | ||
export default src; | ||
} | ||
|
||
declare module "*?inline" { | ||
const src: string; | ||
export default src; | ||
} |
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,7 @@ | ||
import { defineStore } from "pinia"; | ||
|
||
export const useCommonStore = defineStore("commonStore", { | ||
state: () => { | ||
return {}; | ||
}, | ||
}); |
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,5 @@ | ||
export const WelcomeServer = Symbol('WelcomeServer'); | ||
|
||
export interface WelcomeServer { | ||
say(): Promise<string>; | ||
} |
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,18 @@ | ||
import UNOCSS from "@unocss/webpack"; | ||
import presetUno from "@unocss/preset-uno"; | ||
import { ConfigurationContext, type WebpackContext } from "@malagu/cli-service/lib/context/context-protocol"; | ||
|
||
export default async (ctx: WebpackContext) => { | ||
const { configurations } = ctx; | ||
const webpackConfig = ConfigurationContext.getFrontendConfiguration(configurations); | ||
|
||
if (!webpackConfig) return; | ||
// En: Change your unocss options here | ||
// Zh: 可以在这里修改你的 unocss 配置 比如添加presets等 | ||
webpackConfig.plugin("unocss").use( | ||
UNOCSS({ | ||
presets: [presetUno()], | ||
}) | ||
); | ||
webpackConfig.optimization.set("realContentHash", 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,3 @@ | ||
import './welcome-server'; | ||
import { autoBind } from '@malagu/core'; | ||
export default autoBind(); |
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,9 @@ | ||
import { WelcomeServer } from "../common/welcome-protocol"; | ||
import { Rpc } from "@malagu/rpc"; | ||
|
||
@Rpc(WelcomeServer) | ||
export class WelcomeServerImpl implements WelcomeServer { | ||
say(): Promise<string> { | ||
return Promise.resolve("Welcome to Malagu"); | ||
} | ||
} |
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 @@ | ||
{ | ||
"extends": "@vue/tsconfig/tsconfig.dom.json", | ||
"compilerOptions": { | ||
"composite": true, | ||
"experimentalDecorators": true, | ||
"emitDecoratorMetadata": 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,31 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "esnext", | ||
"module": "commonjs", | ||
"strict": true, | ||
"jsx": "preserve", | ||
"moduleResolution": "node", | ||
"skipLibCheck": true, | ||
"declaration": true, | ||
"declarationMap": true, | ||
"noImplicitAny": true, | ||
"noEmitOnError": false, | ||
"noImplicitThis": true, | ||
"noUnusedLocals": true, | ||
"strictNullChecks": true, | ||
"experimentalDecorators": true, | ||
"emitDecoratorMetadata": true, | ||
"esModuleInterop": true, | ||
"downlevelIteration": true, | ||
"lib": ["ES2017", "DOM"], | ||
"sourceMap": true, | ||
"rootDir": "src", | ||
"outDir": "lib" | ||
}, | ||
"include": ["src"], | ||
"references": [ | ||
{ | ||
"path": "./tsconfig.app.json" | ||
} | ||
] | ||
} |
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,11 @@ | ||
// Zh: 你不应该在这里改变unocss的配置,应该在src/hooks/webpack.ts中修改 | ||
// 这个文件纯粹就是让unocss的vscode插件生效 | ||
|
||
// En: You should not change the unocss configuration here, you should change it in src/hooks/webpack.ts | ||
// This file is just for the unocss vscode plugin to take effect | ||
import { defineConfig } from "unocss"; | ||
import presetUno from "@unocss/preset-uno"; | ||
|
||
export default defineConfig({ | ||
presets: [presetUno()], | ||
}); |