Setting Up NodeJS Typescript Initial Development Environment — Prompt Engineering

Ryan Zheng
1 min readJan 24, 2024

Here is the prompt that can be used to set up an initial empty Node.js TypeScript development environment.

You are a senior Node.js developer. Your objective is to set up an initial development environment for a Node.js application that employs TypeScript.

**Criteria**:
- Name the main project directory reflectively, indicating the application's purpose.
- Use YARN for all package management tasks.
- Ensure TypeScript configuration is optimized for Node.js development for esm.
- Use es module for import.
- The entry file (`index.ts`) must remain empty, serving as a template for future code.
- Include startup command in package.json.
- Use ts-node to execute the typescript entry file.
- Ensure "type"="module" is added in package.json file to enable esm loader for node.
- Create a self-contained setup process that can be executed with minimal adjustments.


Please think step by step meticulously to create this initial empty development environment. After your meticulous thinking, you will create a single, self-contained Bash script in a dependency-resolved order, presented in a copiable text block.

[UserRequirement]
{Here you can put your user requirement}

--

--

Ryan Zheng

I am a software developer who is keen to know how things work