Git Product home page Git Product logo

tsready's Introduction

Project Overview

Reason for Creating the Project

  • (Emphasis) When trying to configure ts-node as mentioned, I continuously encountered insurmountable errors that required about two hours of troubleshooting.
  • I set up the project using tsx to ensure that others do not face similar issues and can execute the configuration smoothly.

Advantages of the Project Template

  • Utilizes TypeScript by default.
  • Allows the use of await at the top-level of the code (outside functions).
  • Operates based on ESNext standards for TypeScript.
  • Enables writing code in the style of import ~ from "./util.ts" (similar to Python).
  • Offers the benefit of using await at the top-level.
  • Includes ESLint for maintaining code quality and consistency.

How to Run the Program

Execute the following command to run main.ts located under the src directory. The code makes a simple request stored inside util and outputs the result as a string.

npm run main

How to Run the Program With NPM

You can install create-tsready globally to use it anywhere.

npm install -g create-tsready

Usage

Create a New Project

Use the following command to create a new project:

npm init tsready my-new-project

This command will create a new directory called my-new-project, copy the TypeScript template files, and install the necessary dependencies.

Project Directory Structure

After creating a new project, the directory structure will be as follows:

my-new-project/
├── src/
│   └── main.ts
├── tsconfig.json
├── .eslintrc.json
├── .eslintignore
└── package.json
  • src/main.ts: The main TypeScript entry file.
  • tsconfig.json: TypeScript compiler configuration file.
  • .eslintrc.json: ESLint configuration file.
  • .eslintignore: Files and directories to ignore for ESLint.
  • package.json: Project's npm configuration file.

Start the Project

Once the project is set up, you can start it with:

npm run main

Running EsLint

To check for code quality and consistency using ESLint, run the following command:

npx eslint src/**/*.ts

To automatically fix issues that can be resolved, run:

npx eslint src/**/*.ts --fix

Contributing

If you would like to contribute, please submit a PR or open an issue.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

tsready's People

Contributors

stat-pan avatar statpan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.