fix(core): update
This commit is contained in:
		
							
								
								
									
										6
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										6
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @@ -1222,9 +1222,9 @@ | ||||
|       "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==" | ||||
|     }, | ||||
|     "@types/node": { | ||||
|       "version": "13.7.7", | ||||
|       "resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-13.7.7.tgz", | ||||
|       "integrity": "sha512-Uo4chgKbnPNlxQwoFmYIwctkQVkMMmsAoGGU4JKwLuvBefF0pCq4FybNSnfkfRCpC7ZW7kttcC/TrRtAJsvGtg==" | ||||
|       "version": "13.9.0", | ||||
|       "resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-13.9.0.tgz", | ||||
|       "integrity": "sha512-0ARSQootUG1RljH2HncpsY2TJBfGQIKOOi7kxzUY6z54ePu/ZD+wJA8zI2Q6v8rol2qpG/rvqsReco8zNMPvhQ==" | ||||
|     }, | ||||
|     "@types/relateurl": { | ||||
|       "version": "0.2.28", | ||||
|   | ||||
| @@ -20,11 +20,11 @@ | ||||
|     "@gitzone/tsrun": "^1.2.8", | ||||
|     "@gitzone/tstest": "^1.0.28", | ||||
|     "@pushrocks/tapbundle": "^3.2.0", | ||||
|     "@types/node": "^13.7.7", | ||||
|     "tslint": "^6.0.0", | ||||
|     "tslint-config-prettier": "^1.15.0" | ||||
|   }, | ||||
|   "dependencies": { | ||||
|     "@types/node": "^13.9.0", | ||||
|     "@babel/core": "^7.6.2", | ||||
|     "@babel/plugin-proposal-class-properties": "^7.5.5", | ||||
|     "@babel/plugin-proposal-decorators": "^7.6.0", | ||||
|   | ||||
| @@ -21,5 +21,21 @@ export const runCli = async () => { | ||||
|     } | ||||
|   }); | ||||
|  | ||||
|   tsBundleCli.addCommand('element').subscribe(async argvArg => { | ||||
|     const tsbundle = new TsBundle(); | ||||
|     // const htmlHandler = new HtmlHandler(); | ||||
|     switch (true) { | ||||
|       case argvArg.production || process.env.CI: | ||||
|         await tsbundle.buildProduction('./ts_web/index.ts', './dist_ts_web/bundle.js'); | ||||
|         // await htmlHandler.minifyHtml(); | ||||
|         break; | ||||
|       case argvArg.test: | ||||
|       default: | ||||
|         await tsbundle.buildTest(argvArg.from, argvArg.to); | ||||
|         // await htmlHandler.copyHtml(); | ||||
|         return; | ||||
|     } | ||||
|   }); | ||||
|  | ||||
|   tsBundleCli.startParse(); | ||||
| }; | ||||
|   | ||||
| @@ -10,15 +10,15 @@ export class HtmlHandler { | ||||
|   } | ||||
|  | ||||
|   // copies the html | ||||
|   public async copyHtml() { | ||||
|   public async copyHtml(targetPathArg = this.targetFilePath) { | ||||
|     if (!(await this.checkIfExists())) { | ||||
|       return; | ||||
|     } | ||||
|     await plugins.smartfile.fs.copy(this.sourceFilePath, this.targetFilePath); | ||||
|     await plugins.smartfile.fs.copy(this.sourceFilePath, targetPathArg); | ||||
|   } | ||||
|  | ||||
|   // copies and minifies the html | ||||
|   public async minifyHtml() { | ||||
|   public async minifyHtml(targetPathArg = this.targetFilePath) { | ||||
|     if (!(await this.checkIfExists())) { | ||||
|       return; | ||||
|     } | ||||
| @@ -33,6 +33,6 @@ export class HtmlHandler { | ||||
|       collapseInlineTagWhitespace: true, | ||||
|       removeComments: true | ||||
|     }); | ||||
|     plugins.smartfile.memory.toFsSync(minifiedHtml, this.targetFilePath); | ||||
|     plugins.smartfile.memory.toFsSync(minifiedHtml, targetPathArg); | ||||
|   } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user