Skip to content

(init-templates): Delete some line no longer needed by ts-node in typescript template #20754

@yamatatsu

Description

@yamatatsu

Describe the feature

Now, The template of typescript has some unnecessary lines.
The following seems a bit misleadable.

  • shebang #!/usr/bin/env node in the bin file
    • The bin file is exec by ts-node, so shebang is unnecessary.
  • source-map-support in the bin file
  • "build": "tsc" and "watch": "tsc -w" in package.json
    • It is not needed to build to .js file because ts-node can exec .ts

Use Case

This modifying make the templates simple.

Proposed Solution

  • remove shebang from the bin file
  • remove using source-map-support/register
  • remove two npm scripts "build": "tsc" and "watch": "tsc -w" from package.json

The target of these should be app and sample-app only, not lib.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.28.0

Environment details (OS name and version, etc.)

macOS 12.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliIssues related to the CDK CLIfeature-requestA feature should be added or improved.p2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions