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
import fs from "node:fs"; | |
import path from "node:path"; | |
import { parse } from "@babel/parser"; | |
import traverse from "@babel/traverse"; | |
import { csvWrite } from "./utils.js"; | |
// 解析文件内容为 AST | |
const parseFile = (code) => { | |
return parse(code, { | |
sourceType: "module", |
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
import { useMemoizedFn, useMount, useUnmountedRef } from "ahooks"; | |
import React, { useState } from "react"; | |
import { FlatList, FlatListProps } from "react-native"; | |
interface CFlatListProps<ItemT> { | |
onFetch: ( | |
isRefresh: boolean, | |
success: (data: ItemT[], pageSize: number) => void, | |
fail: (err: string) => void | |
) => void; |
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
// deps: zustand, immer | |
import { create } from "zustand"; | |
import { immer } from "zustand/middleware/immer"; | |
export type TStore<T> = ReturnType<typeof createStore<T>> | |
export function createStore<T>(initState: T) { | |
return create<T>()( | |
immer((set) => ({ |
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
version: "3.3" | |
# 启动两个服务 | |
services: | |
box1: | |
# 设置容器名字 | |
container_name: box1 | |
image: shooan/hello | |
# 连接到new网络 | |
networks: |