Skip to content

feat(create): add build contract with debug#321

Merged
RetricSu merged 4 commits intodevelopfrom
create-script-debug
Dec 2, 2025
Merged

feat(create): add build contract with debug#321
RetricSu merged 4 commits intodevelopfrom
create-script-debug

Conversation

@RetricSu
Copy link
Copy Markdown
Collaborator

@RetricSu RetricSu commented Dec 2, 2025

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds debug build capabilities to the CKB JavaScript contract build system, enabling developers to build contracts with debugging features such as sourcemaps, unminified code, and debug symbols. Additionally, it refactors the template configuration structure to improve maintainability.

  • Adds --debug flag support to build-contract.js and build-all.js scripts with debug-specific esbuild parameters
  • Introduces new npm scripts (build:debug, build:contract:debug, deploy:debug) for building and deploying debug versions
  • Refactors template configuration by extracting interfaces and separating concerns in config.ts and creating a new type.ts file

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
templates/v4/base-template/scripts/build-contract.js Adds debug mode support with conditional esbuild parameters and argument parsing for --debug flag
templates/v4/base-template/scripts/build-all.js Propagates debug flag to individual contract builds
templates/v4/base-template/README.md.template Documents new debug build commands and scripts
src/templates/type.ts Extracts TemplateContext interface to separate type definition file
src/templates/prompts.ts Updates import path for TemplateContext from config to type file
src/templates/processor.ts Updates imports and refactors to use new config structure
src/templates/config.ts Refactors configuration by introducing PackageJsonConfig interface and adding debug-related scripts
src/templates/README.md Removes entire implementation documentation file (373 lines)
README.md Minor wording improvement in project creation description

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

RetricSu and others added 2 commits December 2, 2025 13:19
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@RetricSu RetricSu merged commit 81e67f0 into develop Dec 2, 2025
2 checks passed
@RetricSu RetricSu deleted the create-script-debug branch December 2, 2025 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants