-
Notifications
You must be signed in to change notification settings - Fork 4.5k
(init-templates): Delete some line no longer needed by ts-node in typescript template #20754
Copy link
Copy link
Closed
Labels
cliIssues related to the CDK CLIIssues related to the CDK CLIfeature-requestA feature should be added or improved.A feature should be added or improved.p2
Description
Describe the feature
Now, The template of typescript has some unnecessary lines.
The following seems a bit misleadable.
- shebang
#!/usr/bin/env nodein the bin file- The bin file is exec by
ts-node, so shebang is unnecessary.
- The bin file is exec by
source-map-supportin the bin file- The bin file is exec by
ts-node, so it mapped to source automatically in stack traces withoutsource-map-support. - https://github.com/TypeStrong/ts-node#:~:text=Automatic%20sourcemaps%20in%20stack%20traces
- The bin file is exec by
"build": "tsc"and"watch": "tsc -w"in package.json- It is not needed to build to
.jsfile because ts-node can exec.ts
- It is not needed to build to
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
cliIssues related to the CDK CLIIssues related to the CDK CLIfeature-requestA feature should be added or improved.A feature should be added or improved.p2