diff --git a/package.json b/package.json index e6e0ec4..dab279b 100644 --- a/package.json +++ b/package.json @@ -68,6 +68,7 @@ }, "dependencies": { "@vtrbo/utils-arr": "workspace:*", + "@vtrbo/utils-color": "workspace:*", "@vtrbo/utils-is": "workspace:*", "@vtrbo/utils-log": "workspace:*", "@vtrbo/utils-obj": "workspace:*", diff --git a/packages/color/index.ts b/packages/color/index.ts new file mode 100644 index 0000000..3c00a15 --- /dev/null +++ b/packages/color/index.ts @@ -0,0 +1,2 @@ +export * from './types' +export * from './src/color' diff --git a/packages/color/package.json b/packages/color/package.json new file mode 100644 index 0000000..cba4465 --- /dev/null +++ b/packages/color/package.json @@ -0,0 +1,56 @@ +{ + "name": "@vtrbo/utils-color", + "type": "module", + "version": "0.4.0-beta.4", + "description": "Collection of common JavaScript or TypeScript utils.", + "author": { + "name": "Victor Bo", + "email": "hi@vtrbo.cn" + }, + "license": "MIT", + "homepage": "https://github.com/vtrbo", + "bugs": "https://github.com/vtrbo/utils/issues", + "keywords": [ + "typescript", + "javascript", + "utils", + "vue", + "react", + "svelte", + "vite" + ], + "exports": { + ".": { + "types": "./index.d.ts", + "import": "./index.js", + "require": "./index.cjs" + } + }, + "main": "./index.js", + "module": "./index.js", + "types": "./index.d.ts", + "typesVersions": { + "*": { + "*": [ + "./*", + "./index.d.ts" + ] + } + }, + "files": [ + "README.md", + "index.cjs", + "index.d.cts", + "index.d.ts", + "index.js" + ], + "scripts": { + "build": "tsup", + "clean": "pnpm clean:dist && pnpm clean:deps", + "clean:dist": "rimraf dist", + "clean:deps": "rimraf node_modules" + }, + "dependencies": { + "@vtrbo/utils-tool": "workspace:*" + } +} diff --git a/packages/color/src/color.ts b/packages/color/src/color.ts new file mode 100644 index 0000000..c8ccc1f --- /dev/null +++ b/packages/color/src/color.ts @@ -0,0 +1,3 @@ +export function fn() { + return '' +} diff --git a/packages/color/tsup.config.ts b/packages/color/tsup.config.ts new file mode 100644 index 0000000..e2bc6d0 --- /dev/null +++ b/packages/color/tsup.config.ts @@ -0,0 +1,9 @@ +import { defineConfig } from 'tsup' + +export default defineConfig({ + entry: ['index.ts'], + format: ['cjs', 'esm'], + dts: true, + clean: true, + splitting: true, +}) diff --git a/packages/color/types/index.ts b/packages/color/types/index.ts new file mode 100644 index 0000000..74a964f --- /dev/null +++ b/packages/color/types/index.ts @@ -0,0 +1 @@ +export type Test = string diff --git a/packages/core/index.ts b/packages/core/index.ts index ddc1f8f..f23fac1 100644 --- a/packages/core/index.ts +++ b/packages/core/index.ts @@ -4,3 +4,4 @@ export * from '@vtrbo/utils-log' export * from '@vtrbo/utils-obj' export * from '@vtrbo/utils-arr' export * from '@vtrbo/utils-str' +export * from '@vtrbo/utils-color' diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 82cc5a5..019c0fc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,9 @@ importers: '@vtrbo/utils-arr': specifier: workspace:* version: link:packages/arr + '@vtrbo/utils-color': + specifier: workspace:* + version: link:packages/color '@vtrbo/utils-is': specifier: workspace:* version: link:packages/is @@ -88,6 +91,12 @@ importers: specifier: workspace:* version: link:../tool + packages/color: + dependencies: + '@vtrbo/utils-tool': + specifier: workspace:* + version: link:../tool + packages/is: dependencies: '@vtrbo/utils-obj':