-
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 branch information
Xicheng Guo
committed
Jan 17, 2024
1 parent
e64835f
commit f71b79c
Showing
26 changed files
with
115 additions
and
82 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,30 +1,39 @@ | ||
import { nodeResolve } from '@rollup/plugin-node-resolve'; | ||
import babel from '@rollup/plugin-babel'; | ||
import commonjs from '@rollup/plugin-commonjs'; | ||
import json from '@rollup/plugin-json'; | ||
import typescript from '@rollup/plugin-typescript'; | ||
import { nodeResolve } from "@rollup/plugin-node-resolve"; | ||
import babel from "@rollup/plugin-babel"; | ||
import commonjs from "@rollup/plugin-commonjs"; | ||
import json from "@rollup/plugin-json"; | ||
import typescript from "@rollup/plugin-typescript"; | ||
import dts from "rollup-plugin-dts"; | ||
|
||
export default { | ||
input: 'src/index.ts', | ||
output: [ | ||
{ | ||
file: 'dist/bundle.cjs.js', // CommonJS 输出文件 | ||
format: 'cjs', | ||
}, | ||
{ | ||
file: 'dist/bundle.esm.js', // ES Module 输出文件 | ||
format: 'esm', | ||
}, | ||
], | ||
plugins: [ | ||
typescript({ include: ['./src/**/*.ts'] }), | ||
babel({ | ||
babelHelpers: 'bundled', | ||
extensions: ['.ts', '.tsx'], | ||
presets: ['@babel/preset-env', '@babel/preset-typescript'], | ||
}), | ||
nodeResolve(), | ||
commonjs(), | ||
json() | ||
] | ||
}; | ||
export default [ | ||
{ | ||
input: "src/index.ts", | ||
output: [ | ||
{ | ||
file: "dist/bundle.cjs.js", // CommonJS 输出文件 | ||
format: "cjs", | ||
}, | ||
{ | ||
file: "dist/bundle.esm.js", // ES Module 输出文件 | ||
format: "esm", | ||
}, | ||
], | ||
plugins: [ | ||
typescript({ include: ["./src/**/*.ts"] }), | ||
babel({ | ||
babelHelpers: "bundled", | ||
extensions: [".ts", ".tsx"], | ||
presets: ["@babel/preset-env", "@babel/preset-typescript"], | ||
}), | ||
nodeResolve(), | ||
commonjs(), | ||
json(), | ||
], | ||
}, | ||
/* 单独生成声明文件 */ | ||
{ | ||
input: "dist/types/index.d.ts", | ||
output: [{ file: "dist/index.d.ts", format: "es" }], | ||
plugins: [dts()], | ||
}, | ||
]; |
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
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
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
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
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
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,8 +1,22 @@ | ||
import { createRequest } from "./request-lib/create-request"; | ||
import { BaseModel, GiteeRepository, GitlabRepository, GithubRepository, PlainObject } from "./repository-lib"; | ||
import { SingletonFactory } from "./utils" | ||
export { | ||
createRequest, BaseModel, PlainObject, | ||
GiteeRepository, GitlabRepository, GithubRepository, SingletonFactory | ||
}; | ||
export { createRequest } from './request-lib/create-request'; | ||
|
||
export { SingletonFactory } from './utils/singleton-factory'; | ||
|
||
export { BaseRepository } from './repository-lib/base/base-repository'; | ||
|
||
export { BaseModel } from './repository-lib/base/base-model'; | ||
|
||
export { PlainObject } from './repository-lib/base/plain-object'; | ||
|
||
export { GiteeRepository } from './repository-lib/gitee/gitee-repository'; | ||
|
||
export { GithubRepository } from './repository-lib/github/github-repository'; | ||
|
||
export { GitlabRepository } from './repository-lib/gitlab/gitlab-repository'; | ||
|
||
export { GitlabUser } from './repository-lib/gitlab/gitlab-user'; | ||
|
||
export { GithubUser } from './repository-lib/github/github-user'; | ||
|
||
export { GiteeUser } from './repository-lib/gitee/gitee-user'; | ||
|
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
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
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
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
This file was deleted.
Oops, something went wrong.
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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