Skip to content

Commit

Permalink
🐛 fix: Fix build (#42)
Browse files Browse the repository at this point in the history
* 🐛 fix: Fix build

* 🐛 fix: Fix version

* 🔖 chore(release): v1.25.8-beta.1 [skip ci]

### [Version 1.25.8-beta.1](v1.25.7...v1.25.8-beta.1)
<sup>Released on **2024-11-25**</sup>

#### 🐛 Bug Fixes

- **misc**: Fix build, Fix version.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

* **misc**: Fix build ([947bd21](947bd21))
* **misc**: Fix version ([3b60176](3b60176))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>

* 🐛 fix: Fix build

* 🐛 fix: Fix build

* 🔖 chore(release): v1.25.8-beta.2 [skip ci]

### [Version&nbsp;1.25.8-beta.2](v1.25.8-beta.1...v1.25.8-beta.2)
<sup>Released on **2024-11-25**</sup>

#### 🐛 Bug Fixes

- **misc**: Fix build, Fix build.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

* **misc**: Fix build ([b6ae2a1](b6ae2a1))
* **misc**: Fix build ([820b4bc](820b4bc))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>

* 🔧 chore: Clean file

---------

Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
  • Loading branch information
canisminor1990 and semantic-release-bot authored Nov 25, 2024
1 parent e2f634a commit 5939f0a
Show file tree
Hide file tree
Showing 18 changed files with 112 additions and 58 deletions.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions .dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const themeConfig: SiteThemeConfig = {
export default defineConfig({
alias: {
'@lobehub/tts/react': path.join(__dirname, './src/react'),
'@lobehub/tts/server': path.join(__dirname, './src/server'),
},
apiParser: isProduction ? {} : false,
base: '/',
Expand Down
File renamed without changes.
15 changes: 1 addition & 14 deletions .fatherrc.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
import { defineConfig } from 'father';

export default defineConfig({
esm: {
output: 'dist',
overrides: {
'src/core': {
output: 'core',
},
'src/react': {
output: 'react',
},
'src/server': {
output: 'server',
},
},
},
esm: { output: 'es' },
});
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,6 @@ public/*.js
bun.lockb
react/**
server/**

core/**
react.d.ts
server.d.ts
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
52 changes: 52 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,58 @@

# Changelog

### [Version 1.25.8-beta.2](https://github.com/lobehub/lobe-tts/compare/v1.25.8-beta.1...v1.25.8-beta.2)

<sup>Released on **2024-11-25**</sup>

#### 🐛 Bug Fixes

- **misc**: Fix build, Fix build.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

- **misc**: Fix build ([b6ae2a1](https://github.com/lobehub/lobe-tts/commit/b6ae2a1))
- **misc**: Fix build ([820b4bc](https://github.com/lobehub/lobe-tts/commit/820b4bc))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>

### [Version 1.25.8-beta.1](https://github.com/lobehub/lobe-tts/compare/v1.25.7...v1.25.8-beta.1)

<sup>Released on **2024-11-25**</sup>

#### 🐛 Bug Fixes

- **misc**: Fix build, Fix version.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

- **misc**: Fix build ([947bd21](https://github.com/lobehub/lobe-tts/commit/947bd21))
- **misc**: Fix version ([3b60176](https://github.com/lobehub/lobe-tts/commit/3b60176))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>

### [Version 1.25.7](https://github.com/lobehub/lobe-tts/compare/v1.25.6...v1.25.7)

<sup>Released on **2024-11-24**</sup>
Expand Down
52 changes: 15 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lobehub/tts",
"version": "1.25.7",
"version": "1.25.8",
"description": "A high-quality & reliable TTS React Hooks library",
"homepage": "https://github.com/lobehub/lobe-tts",
"bugs": {
Expand All @@ -13,36 +13,18 @@
"license": "MIT",
"author": "LobeHub <i@lobehub.com>",
"sideEffects": false,
"type": "module",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./core/index.d.ts",
"import": "./core/index.js",
"module": "./core/index.js"
},
"./server": {
"types": "./server/index.d.ts",
"import": "./server/index.js",
"module": "./server/index.js"
},
"./react": {
"types": "./react/index.d.ts",
"import": "./react/index.js",
"module": "./react/index.js"
}
},
"main": "./core/index.js",
"module": "./core/index.js",
"types": "./core/index.d.ts",
"main": "es/index.js",
"module": "es/index.js",
"types": "es/index.d.ts",
"files": [
"dist",
"core",
"react",
"server"
"es",
"server.d.ts",
"server.js",
"react.d.ts",
"react.js"
],
"scripts": {
"build": "father build",
"build": "tsx ./scripts/clean.ts && father build && tsx ./scripts/build.ts",
"ci": "npm run lint && npm run type-check && npm run doctor",
"dev": "father dev",
"docs:build": "npm run build && dumi build",
Expand Down Expand Up @@ -83,11 +65,6 @@
"eslint --fix"
]
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 10"
],
"dependencies": {
"@babel/runtime": "^7.26.0",
"lodash-es": "^4.17.21",
Expand All @@ -105,18 +82,18 @@
"@commitlint/cli": "^19.6.0",
"@lobehub/i18n-cli": "^1.20.0",
"@lobehub/lint": "^1.24.4",
"@lobehub/ui": "^1.153.1",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.17.7",
"@types/react": "^18.3.12",
"@types/react": "18.2.40",
"@types/react-dom": "^18.3.1",
"@types/uuid": "^9.0.8",
"@vercel/node": "^3.2.26",
"@vitest/coverage-v8": "~1.2.2",
"babel-plugin-antd-style": "^1.0.4",
"commitlint": "^19.6.0",
"concurrently": "^9.1.0",
"dumi": "^2.4.14",
"dumi-theme-lobehub": "^1.10.4",
"dumi-theme-lobehub": "^1.10.6",
"eslint": "^8.57.1",
"father": "^4.5.1",
"husky": "^9.1.7",
Expand All @@ -128,7 +105,8 @@
"stylelint": "^15.11.0",
"tsx": "^4.19.2",
"typescript": "^5.7.2",
"vercel": "^28.20.0"
"vercel": "^28.20.0",
"vitest": "~1.2.2"
},
"peerDependencies": {
"@lobehub/ui": ">=1",
Expand Down
1 change: 1 addition & 0 deletions react.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './es/react';
11 changes: 11 additions & 0 deletions scripts/build.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { copyFileSync } from 'node:fs';
import { resolve } from 'node:path';

const root = resolve(__dirname, '..');

const build = async (filename: string) => {
copyFileSync(filename, filename.replace('.js', '.d.ts'));
};

build(resolve(root, 'react.js'));
build(resolve(root, 'server.js'));
13 changes: 13 additions & 0 deletions scripts/clean.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { existsSync, unlinkSync } from 'node:fs';
import { resolve } from 'node:path';

const root = resolve(__dirname, '..');

const clean = async (filename: string) => {
if (existsSync(filename)) {
unlinkSync(filename);
}
};

clean(resolve(root, 'react.d.ts'));
clean(resolve(root, 'server.d.ts'));
1 change: 1 addition & 0 deletions server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './es/server';
21 changes: 15 additions & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,24 @@
"esModuleInterop": true,
"jsx": "react-jsx",
"lib": ["dom", "dom.iterable", "esnext"],
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"module": "esnext",
"moduleResolution": "node",
"paths": {
"@@/*": [".dumi/tmp/*"],
"@/*": ["./src/*"],
"@lobehub/tts": ["./src/core"],
"@lobehub/tts/react": ["./src/react"]
}
"@lobehub/tts": ["./src"],
"@lobehub/tts/*": ["src/*"],
"@lobehub/tts/react": ["./src/react"],
"@lobehub/tts/react/*": ["./src/react/*"],
"@lobehub/tts/server": ["./src/server"],
"@lobehub/tts/server/*": ["./src/server/*"]
},
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"target": "es6",
"types": ["vitest/globals"]
},
"exclude": ["./react.d.ts", "./server.d.ts"],
"include": ["src", "docs", ".dumirc.ts", "api", "**/*.ts", "**/*.d.ts", "**/*.tsx"]
}

0 comments on commit 5939f0a

Please sign in to comment.