浏览代码

changed package details and corrected some spaces

bastien 2 周之前
父节点
当前提交
03e36d4875
共有 4 个文件被更改,包括 16 次插入26 次删除
  1. 4 5
      package-lock.json
  2. 7 10
      package.json
  3. 3 9
      src/template.ts
  4. 2 2
      tsconfig.json

+ 4 - 5
package-lock.json

@@ -1,12 +1,12 @@
 {
-	"name": "canonicalclasscpp",
-	"version": "0.3.3",
+	"name": "bchanotcanonicalclasscpp",
+	"version": "1.0.0",
 	"lockfileVersion": 2,
 	"requires": true,
 	"packages": {
 		"": {
-			"name": "canonicalclasscpp",
-			"version": "0.3.3",
+			"name": "bchanotcanonicalclasscpp",
+			"version": "1.0.0",
 			"license": "MIT",
 			"devDependencies": {
 				"@types/glob": "^7.1.1",
@@ -440,7 +440,6 @@
 			"dependencies": {
 				"anymatch": "~3.1.1",
 				"braces": "~3.0.2",
-				"fsevents": "~2.1.1",
 				"glob-parent": "~5.1.0",
 				"is-binary-path": "~2.1.0",
 				"is-glob": "~4.0.1",

+ 7 - 10
package.json

@@ -1,18 +1,15 @@
 {
-	"name": "canonicalclasscpp",
-	"displayName": "42 Canonical Class CPP",
-	"description": "This extension is to automatically create a canonical hpp and cpp file",
-	"version": "0.3.4",
-	"publisher": "frfreyCanonicalClassCPP",
+	"name": "bchanotcanonicalclasscpp",
+	"displayName": "42 Canonical Class and template CPP of bchanot",
+	"description": "This extension is to automatically create a canonical hpp, cpp file or tpp",
+	"version": "1.0.0",
+	"publisher": "bchanot",
 	"icon": "42.png",
 	"repository": {
 		"type": "git",
-		"url": "https://github.com/Etheram68/Header-Cpp-Class"
+		"url": "https://git.bchanot.fr/bchanot/cpp_canonical_class"
 	},
-	"bugs": {
-		"url": "https://github.com/Etheram68/Header-Cpp-Class/issues"
-	},
-	"homepage": "https://github.com/Etheram68/Header-Cpp-Class",
+	"homepage": "https://git.bchanot.fr/bchanot/cpp_canonical_class",
 	"license": "MIT",
 	"engines": {
 		"vscode": "^1.47.0"

+ 3 - 9
src/template.ts

@@ -32,7 +32,7 @@ export const getTemplate = ( name: string | undefined, filePathCpp: vscode.Uri ,
 						"\n/*\n** -------------------------------- DESTRUCTOR --------------------------------\n*/\n\n" +
 						name + "::~" + name + "() {\n}\n\n" +
 						"\n/*\n** --------------------------------- OVERLOAD ---------------------------------\n*/\n\n" +
-						name + " &				" + name + "::operator=(" + name + " const &rhs) {\n	(void)rhs;\n	//if (this != &rhs)\n" +
+						name + "				&" + name + "::operator=(" + name + " const &rhs) {\n	(void)rhs;\n	//if (this != &rhs)\n" +
 						"	//{\n		//this->_value = rhs.getValue();\n	//}\n" +
 						"	return *this;\n}\n\n" +
 						"std::ostream			&operator<<(std::ostream & o, " + name + " const &i) {\n	(void)i;\n	//o << \"Value = \" << i.getValue();\n	return o;\n}\n\n" +
@@ -45,9 +45,7 @@ export const getTemplate = ( name: string | undefined, filePathCpp: vscode.Uri ,
 						"#include <iostream>\n" +
 						"#include <string>\n\n" +
 						"class " + name + "\n{\n" +
-						"\n" +
 						"	public:\n" +
-						"\n" +
 						"		" + name + "();\n" +
 						"		" + name + "(" + name + " const &src);\n" +
 						"		~" + name + "();\n" +
@@ -86,16 +84,14 @@ export const getTemplateTpp = ( name: string | undefined, filePathTpp: vscode.Ur
 						"#include <string>\n\n" +
 						"template < typename T >\n" +
 						"class " + name + "\n{\n" +
-						"\n" +
 						"	public:\n" +
-						"\n" +
-						"\n	/*\n	** ------------------------------- CONSTRUCTOR --------------------------------\n	*/\n\n" +
+						"	/*\n	** ------------------------------- CONSTRUCTOR --------------------------------\n	*/\n\n" +
 						"		" + name + "() {};\n" +
 						"		" + name + "(" + name + " const &src) {};\n\n" +
 						"\n	/*\n	** -------------------------------- DESTRUCTOR --------------------------------\n	*/\n\n" +
 						"		~" + name + "() {};\n\n" +
 						"\n	/*\n	** --------------------------------- OVERLOAD ---------------------------------\n	*/\n\n" +
-						"		" + name + "		&operator=(" + name + " const &rhs) {\n			(void)rhs;\n		//if (this != &rhs)\n" +
+						"		" + name + "		&operator=(" + name + " const &rhs) {\n			(void)rhs;\n			//if (this != &rhs)\n" +
 						"			//{\n				//this->_value = rhs.getValue();\n			//}\n" +
 						"			return *this;\n		}\n\n" +
 						"\n	/*\n	** --------------------------------- METHODS ----------------------------------\n	*/\n\n" +
@@ -136,9 +132,7 @@ export const getTemplateFull = ( name: string, filePathCpp: vscode.Uri, filePath
 					"# define " + name.toUpperCase() + "_HPP\n\n" +
 					"#include <iostream>\n\n" +
 					"class " + name + "\n{\n" +
-					"\n" +
 					"	public:\n" +
-					"\n" +
 					"		" + name + "();\n" +
 					"		" + name + "(" + name + " const &src);\n" +
 					"		~" + name + "();\n" +

+ 2 - 2
tsconfig.json

@@ -1,10 +1,10 @@
 {
 	"compilerOptions": {
 		"module": "commonjs",
-		"target": "es6",
+		"target": "es2020",
 		"outDir": "out",
 		"lib": [
-			"es6"
+			"es2020"
 		],
 		"sourceMap": true,
 		"rootDir": "src",