Skip to content

Commit

Permalink
refactor: 重构导出结构,优化模块导入方式
Browse files Browse the repository at this point in the history
  • Loading branch information
sj817 committed Dec 27, 2024
1 parent 1bef5f3 commit 5adae14
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Puppeteer } from './puppeteer/index'

export default Puppeteer
export * from './common/common'
export * from './puppeteer/init'
export * from './puppeteer/core'
export * from './puppeteer/index'
export { Puppeteer as default } from './puppeteer/index'
2 changes: 1 addition & 1 deletion src/puppeteer/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import crypto from 'crypto'
import InitChrome from './init'
import { InitChrome } from './init'
import { common } from '@Common'
import { Render, RenderResult, screenshot } from './core'
import { LaunchOptions } from 'puppeteer-core'
Expand Down
2 changes: 1 addition & 1 deletion src/puppeteer/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const enum ChromeUrl {
Google = 'https://storage.googleapis.com/chrome-for-testing-public',
}

export default class InitChrome {
export class InitChrome {
/** 版本 */
version: string
/** 操作系统标识符 */
Expand Down

0 comments on commit 5adae14

Please sign in to comment.