Skip to content

Commit

Permalink
chore: add typing for virtual:convention-routes
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoKam committed Sep 4, 2023
1 parent 390ac00 commit 45c055e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
7 changes: 0 additions & 7 deletions emit-log.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
#!/usr/bin/env bash

echo "running emit-log"

env

# 取出 log.txt 的文件内容
log=$(cat log.txt|grep 'New tag:')

echo $log

# 如果 log.txt 为空
if [ -z "$log" ]; then
curl "https://oapi.dingtalk.com/robot/send?access_token=${DING_TOKEN}" \
Expand All @@ -19,8 +14,6 @@ fi

# 如果 log.txt 不为空,则将 log 作为消息发出去,需要将 log 的换行符替换为 \n
log=${log//$'\n'/\\n}
echo $log
echo $DING_TOKEN
curl "https://oapi.dingtalk.com/robot/send?access_token=${DING_TOKEN}" \
-H 'Content-Type: application/json' \
-d '{"msgtype": "markdown","markdown": {"title":"orca-fe发布通知","text":"### @orca-fe/vite-plugins\n流水线结束,以下模块已发布:\n'"$log"'"}}'
Expand Down
6 changes: 6 additions & 0 deletions packages/vite-plugin-react-convention-routes/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @orca-fe/vite-plugin-react-convention-routes

## 0.0.5

### Patch Changes

- chore: add typing for virtual:convention-routes

## 0.0.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/vite-plugin-react-convention-routes/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@orca-fe/vite-plugin-react-convention-routes",
"version": "0.0.4",
"version": "0.0.5",
"type": "module",
"description": "A vite plugin for react convention routes",
"keywords": [
Expand Down
5 changes: 1 addition & 4 deletions packages/vite-plugin-react-convention-routes/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,18 @@ import chokidar from 'chokidar';
import { createLogger } from 'vite';
import type { CreateRoutesOptions } from './createRoutes';
import { createRoutes } from './createRoutes';

import '../typing.d';

const moduleId = 'virtual:convention-routes';
const log = createLogger();



export type ReactConventionRoutesOptions = CreateRoutesOptions & {

/** 需要扫描的页面根目录 */
pageRoot?: string;

};


export default function reactConventionRoutes(options: ReactConventionRoutesOptions = {}): Plugin {
const defaultPageRoot = resolve(process.cwd(), 'src/pages');
const { pageRoot = defaultPageRoot, ...otherProps } = options;
Expand Down

0 comments on commit 45c055e

Please sign in to comment.