# TS-GluttonousSnake **Repository Path**: wolrdYu/ts-gluttonous-snake ## Basic Information - **Project Name**: TS-GluttonousSnake - **Description**: typeScript+webpack+less 做的贪吃蛇小游戏 - **Primary Language**: TypeScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2022-06-22 - **Last Updated**: 2022-07-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## **贪吃蛇练习** 使用TypeScript + Webpack + Less实现贪吃蛇的例子; ### **项目依赖** TypeScript: - typescript; - ts-loader; Webpack: - webpack; - webpack-cli; - webpack-dev-server; - html-webpack-plugin; - clean-webpack-plugin; Babel: - core-js; - babel-loader; - @babel/core; - @babel/preset-env; Less & CSS资源: - style-loader; - css-loader; - less; - less-loader; - postcss; - postcss-loader; - postcss-preset-env; ### **项目使用** #### **编译运行** 在确保已经正确安装node和npm的前提下: 分别执行下面的命令安装依赖并编译项目: ```bash # 安装依赖 npm i # 编译打包 npm run build ``` 编译完成后,使用浏览器打开dist目录下的`index.html`即可游玩; #### **继续开发** 使用`npm run start`进入开发模式; 默认使用Chrome浏览器打开,可以修改`package.json`中的值: ```json { "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "build": "webpack", "start": "webpack serve --open chrome.exe" } } ``` ### **其他** 视频讲解: - [尚硅谷2021版TypeScript教程(李立超老师TS新课)](https://www.bilibili.com/video/BV1Xy4y1v7S2?p=22) 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)