加入后端工具项目。
This commit is contained in:
		
							
								
								
									
										52
									
								
								code/ts/后端辅助工具/.eslintrc.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								code/ts/后端辅助工具/.eslintrc.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,52 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-02-09 15:26:18
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-02-09 18:36:33
 | 
				
			||||||
 | 
					 * @FilePath: /后端辅助工具/.eslintrc.js
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					module.exports = {
 | 
				
			||||||
 | 
					    env: {
 | 
				
			||||||
 | 
					        browser: true,
 | 
				
			||||||
 | 
					        es2021: true,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    extends: [
 | 
				
			||||||
 | 
					        "standard-with-typescript",
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
 | 
					    overrides: [
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
 | 
					    parserOptions: {
 | 
				
			||||||
 | 
					        ecmaVersion: "latest",
 | 
				
			||||||
 | 
					        sourceType: "module",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    plugins: [
 | 
				
			||||||
 | 
					        "vue",
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
 | 
					    rules: {
 | 
				
			||||||
 | 
					        "quote-props": ["warn", "as-needed",],
 | 
				
			||||||
 | 
					        quotes: ["warn", "double", { allowTemplateLiterals: true, },],
 | 
				
			||||||
 | 
					        indent: ["warn", 4,],
 | 
				
			||||||
 | 
					        "no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
 | 
				
			||||||
 | 
					        "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
 | 
				
			||||||
 | 
					        "no-unused-vars": "warn",
 | 
				
			||||||
 | 
					        semi: ["error", "always",], // 控制行尾部分号
 | 
				
			||||||
 | 
					        "comma-dangle": ["error", {
 | 
				
			||||||
 | 
					            arrays: "always",
 | 
				
			||||||
 | 
					            objects: "always",
 | 
				
			||||||
 | 
					            imports: "never",
 | 
				
			||||||
 | 
					            exports: "never",
 | 
				
			||||||
 | 
					            functions: "never",
 | 
				
			||||||
 | 
					        },], // 数组和对象键值对最后一个逗号
 | 
				
			||||||
 | 
					        "comma-style": ["error", "last",], // 逗号在行位
 | 
				
			||||||
 | 
					        "array-bracket-spacing": ["error", "never",],
 | 
				
			||||||
 | 
					        "no-undef-init": "error",
 | 
				
			||||||
 | 
					        "no-invalid-this": "error",
 | 
				
			||||||
 | 
					        "no-use-before-define": "error",
 | 
				
			||||||
 | 
					        "no-shadow-restricted-names": "error", // 禁止对一些关键字或者保留字进行赋值操作,比如NaN、Infinity、undefined、eval、arguments等
 | 
				
			||||||
 | 
					        // "comma-spacing": ["error", { "before": false, "after": true, },],
 | 
				
			||||||
 | 
					        "brace-style": ["error", "allman", { allowSingleLine: true, },],
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
							
								
								
									
										20
									
								
								code/ts/后端辅助工具/.vscode/launch.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								code/ts/后端辅助工具/.vscode/launch.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
				
			|||||||
 | 
					{
 | 
				
			||||||
 | 
					    // 使用 IntelliSense 了解相关属性。 
 | 
				
			||||||
 | 
					    // 悬停以查看现有属性的描述。
 | 
				
			||||||
 | 
					    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
 | 
				
			||||||
 | 
					    "version": "0.2.0",
 | 
				
			||||||
 | 
					    "configurations": [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            "type": "pwa-node",
 | 
				
			||||||
 | 
					            "request": "launch",
 | 
				
			||||||
 | 
					            "name": "Launch Program",
 | 
				
			||||||
 | 
					            "skipFiles": [
 | 
				
			||||||
 | 
					                "<node_internals>/**"
 | 
				
			||||||
 | 
					            ],
 | 
				
			||||||
 | 
					            "program": "${file}",
 | 
				
			||||||
 | 
					            "outFiles": [
 | 
				
			||||||
 | 
					                "${workspaceFolder}/**/*.js"
 | 
				
			||||||
 | 
					            ]
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										14
									
								
								code/ts/后端辅助工具/.vscode/tasks.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								code/ts/后端辅助工具/.vscode/tasks.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
				
			|||||||
 | 
					{
 | 
				
			||||||
 | 
						"version": "2.0.0",
 | 
				
			||||||
 | 
						"tasks": [
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"type": "typescript",
 | 
				
			||||||
 | 
								"tsconfig": "tsconfig.json",
 | 
				
			||||||
 | 
								"problemMatcher": [
 | 
				
			||||||
 | 
									"$tsc"
 | 
				
			||||||
 | 
								],
 | 
				
			||||||
 | 
								"group": "build",
 | 
				
			||||||
 | 
								"label": "tsc: build - tsconfig.json"
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										16
									
								
								code/ts/后端辅助工具/src/main.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								code/ts/后端辅助工具/src/main.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,16 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					const greetings: string = "Hello, World!";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					console.log( greetings );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					enum Season {
 | 
				
			||||||
 | 
					    spring = 1,
 | 
				
			||||||
 | 
					    summer,
 | 
				
			||||||
 | 
					    autumn,
 | 
				
			||||||
 | 
					    winter,
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					let today: Season = Season.spring;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					console.log( today );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										12
									
								
								code/ts/后端辅助工具/target/main.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								code/ts/后端辅助工具/target/main.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
				
			|||||||
 | 
					var greetings = "Hello, World!";
 | 
				
			||||||
 | 
					console.log(greetings);
 | 
				
			||||||
 | 
					var Season;
 | 
				
			||||||
 | 
					(function (Season) {
 | 
				
			||||||
 | 
					    Season[Season["spring"] = 1] = "spring";
 | 
				
			||||||
 | 
					    Season[Season["summer"] = 2] = "summer";
 | 
				
			||||||
 | 
					    Season[Season["autumn"] = 3] = "autumn";
 | 
				
			||||||
 | 
					    Season[Season["winter"] = 4] = "winter";
 | 
				
			||||||
 | 
					})(Season || (Season = {}));
 | 
				
			||||||
 | 
					;
 | 
				
			||||||
 | 
					var today = Season.spring;
 | 
				
			||||||
 | 
					console.log(today);
 | 
				
			||||||
							
								
								
									
										26
									
								
								code/ts/后端辅助工具/tsconfig.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								code/ts/后端辅助工具/tsconfig.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,26 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-02-09 15:24:20
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-02-09 15:29:03
 | 
				
			||||||
 | 
					 * @FilePath: /后端辅助工具/tsconfig.json
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    "compilerOptions": {
 | 
				
			||||||
 | 
					        "outDir": "./target",
 | 
				
			||||||
 | 
					        "strict": false,
 | 
				
			||||||
 | 
					        "strictNullChecks": true,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // "files": [
 | 
				
			||||||
 | 
					    //     "./src/**/*"
 | 
				
			||||||
 | 
					    // ],
 | 
				
			||||||
 | 
					    "include": [
 | 
				
			||||||
 | 
					        "./src/**/*"
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
 | 
					    "exclude": [
 | 
				
			||||||
 | 
					        "./target"
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user