Promise Training 项目使用教程

Promise Training 项目使用教程

promises-training Practice working with promises through a curated collection of interactive challenges. This repository provides a platform to refine your skills, complete with automated tests to to give you instant feedback and validate your progress. promises-training 项目地址: https://gitcode.com/gh_mirrors/pr/promises-training

1. 项目目录结构及介绍

Promise Training 项目旨在帮助开发者深入理解 JavaScript 中的 Promise 和异步编程。项目目录结构如下:

promises-training/
├── .github/              # GitHub 工作流和配置文件
│   └── workflows/
├── assets/               # 静态资源文件
├── scripts/              # 脚本文件
├── src/                  # 源代码目录
│   ├── exercises/        # 练习题目录,包含图、具体和基础练习
│   │   ├── concrete/      # 模拟真实问题的练习
│   │   ├── foundation/    # 基于 Promise 实现和常见帮助函数的练习
│   │   └── graph/         # 根据依赖关系图进行任务编排的练习
│   ├── lib/              # 内部库文件,不推荐修改
│   ├── tests/            # 测试文件目录
│   └── ...
├── .gitignore            # Git 忽略文件
├── .npmignore            # npm 忽略文件
├── .prettierrc           # Prettier 配置文件
├── .tool-versions        # 工具版本配置文件
├── EPICS.md              # 项目概述和目标
├── LICENSE               # 开源许可证
├── README.md             # 项目说明文件
├── ROADMAP.md            # 项目路线图
└── ...

2. 项目的启动文件介绍

项目的启动主要通过 npm 命令进行。首先,需要安装项目依赖:

npm install

然后,可以通过以下命令运行某个练习的测试:

npm run check <category>/<exercise>

例如,运行 concrete 类别的 parallelChunks 练习的测试:

npm run check concrete/parallelChunks

3. 项目的配置文件介绍

项目的配置文件主要包括:

  • .prettierrc:Prettier 代码格式化配置文件,用于统一代码风格。
  • .tool-versions:工具版本配置文件,用于指定项目使用的工具版本,如 Node.js 版本。
  • .gitignore.npmignore:分别用于配置 Git 和 npm 忽略的文件和目录。

这些配置文件确保项目在多人协作时能够保持一致的代码风格和运行环境。

promises-training Practice working with promises through a curated collection of interactive challenges. This repository provides a platform to refine your skills, complete with automated tests to to give you instant feedback and validate your progress. promises-training 项目地址: https://gitcode.com/gh_mirrors/pr/promises-training

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

丁群曦Mildred

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值