Skip to content

Commit

Permalink
__before_bundle directory should be inside the engine folder. (#57)
Browse files Browse the repository at this point in the history
* 2.2.5

* __before_bundle directory should be inside the engine folder.
Otherwise, dragonbones library will not be found, the bundled .d.ts file will not contain dragonbones librarys, there will be lots of 'codec' type.

* Add utility function: path.basename.
  • Loading branch information
dumganhar authored Feb 22, 2024
1 parent 8969619 commit 02eb2de
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/dts-bundler/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export async function build (options: Options): Promise<boolean> {

const tsConfigPath = statsQuery.tsConfigPath;

const unbundledOutDir = ps.join(outDir, '__before_bundle');
const unbundledOutDir = ps.join(engine, '__dts_before_bundle');
const parsedCommandLine = ts.getParsedCommandLineOfConfigFile(
tsConfigPath, {
declaration: true,
Expand Down
4 changes: 4 additions & 0 deletions modules/utils/src/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ export function dirname (path: string): string {
return formatPath(ps.dirname(path));
}

export function basename (path: string): string {
return formatPath(ps.basename(path));
}

export function join (...args: string[]): string {
return formatPath(ps.join(...args));
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cocos/ccbuild",
"version": "2.2.4",
"version": "2.2.5",
"description": "The next generation of build tool for Cocos engine.",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
Expand Down

0 comments on commit 02eb2de

Please sign in to comment.