From c9e2244a5fedb6fa6dccc2acc48f81bc4be8eaa5 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Fri, 16 Nov 2018 15:04:07 +0100 Subject: [PATCH 1/9] Add keyword "yeoman-generator" to the package.json --- src/generators/app/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/generators/app/index.ts b/src/generators/app/index.ts index 03fb3dcd..e54d33ba 100644 --- a/src/generators/app/index.ts +++ b/src/generators/app/index.ts @@ -380,6 +380,7 @@ class AppGenerator extends Generator name: this.user.git.name(), email: this.user.git.email() }; + result.keywords = ["yeoman-generator"]; result.devDependencies = {}; result.dependencies = {}; From cb58b2d5b868daf95096473bbcf9381999d5ccc8 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Fri, 16 Nov 2018 16:34:28 +0100 Subject: [PATCH 2/9] Add changelog-entries --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24aa6bab..5ed16fc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## TSGeneratorGenerator v1.2.3 + - Improved the `package.json`-template + +[Show differences][v1.2.3] + ## TSGeneratorGenerator v1.2.2 - Improved the creation of the `package.json`-file - Removed unnecessary dependencies @@ -41,4 +46,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [v1.0.1]: https://github.com/manuth/TSGeneratorGenerator/compare/v1.0.0...v1.0.1 [v1.2.0]: https://github.com/manuth/TSGeneratorGenerator/compare/v1.0.1...v1.2.0 [v1.2.1]: https://github.com/manuth/TSGeneratorGenerator/compare/v1.2.0...v1.2.1 -[v1.2.2]: https://github.com/manuth/TSGeneratorGenerator/compare/v1.2.1...v1.2.2 \ No newline at end of file +[v1.2.2]: https://github.com/manuth/TSGeneratorGenerator/compare/v1.2.1...v1.2.2 +[v1.2.3]: https://github.com/manuth/TSGeneratorGenerator/compare/v1.2.2...v1.2.3 \ No newline at end of file From f84c100e4b31c5785299230b5d26d49356da7cd2 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Fri, 16 Nov 2018 16:34:38 +0100 Subject: [PATCH 3/9] Rearrange the package-manifest --- package.json | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 9661cbaa..562a7cda 100644 --- a/package.json +++ b/package.json @@ -2,29 +2,29 @@ "name": "generator-ts-generator", "version": "1.2.2", "description": "A Generator for Yeoman Generators Written in TypeScript.", - "scripts": { - "watch": "tsc -p . --watch", - "compile": "tsc -p .", - "lint": "tslint -p ./ -t verbose", - "test": "mocha", - "prepare": "npm run compile" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/manuth/TSGeneratorGenerator.git" - }, + "author": "Manuel Thalmann ", + "license": "MIT", "keywords": [ "yo", "yoeoman-generator", "Generator", "TypeScript" ], - "author": "Manuel Thalmann ", - "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/manuth/TSGeneratorGenerator.git" + }, "bugs": { "url": "https://github.com/manuth/TSGeneratorGenerator/issues" }, "homepage": "https://github.com/manuth/TSGeneratorGenerator#readme", + "scripts": { + "watch": "tsc -p . --watch", + "compile": "tsc -p .", + "lint": "tslint -p ./ -t verbose", + "test": "mocha", + "prepare": "npm run compile" + }, "devDependencies": { "@types/dedent": "^0.7.0", "@types/fs-extra": "^5.0.4", From 78892dae125c8bdca72850eedf5cd48b3c550a38 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Fri, 16 Nov 2018 16:45:06 +0100 Subject: [PATCH 4/9] Rework the way to generate package-manifests --- src/generators/app/index.ts | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/generators/app/index.ts b/src/generators/app/index.ts index e54d33ba..75b15013 100644 --- a/src/generators/app/index.ts +++ b/src/generators/app/index.ts @@ -330,7 +330,6 @@ class AppGenerator extends Generator */ protected GetPackageJSON = (): {} => { - let scripts = [ "watch", "compile", @@ -370,19 +369,21 @@ class AppGenerator extends Generator "@types/yosay"); } - let result: any = {}; - let packageJSON = require(Path.join("..", "..", "..", "package.json")); - result.name = this.Settings[AppSetting.ModuleName]; - result.version = "0.0.0"; - result.description = this.Settings[AppSetting.Description]; - result.scripts = {}; - result.author = { - name: this.user.git.name(), - email: this.user.git.email() + let result = { + name: this.Settings[AppSetting.ModuleName], + version: "0.0.0", + description: this.Settings[AppSetting.Description], + author: { + name: this.user.git.name(), + email: this.user.git.email() + }, + keywords: ["yeoman-generator"], + scripts: {} as { [key: string]: string }, + dependencies: {} as { [key: string]: string }, + devDependencies: {} as { [key: string]: string } }; - result.keywords = ["yeoman-generator"]; - result.devDependencies = {}; - result.dependencies = {}; + + let packageJSON: typeof result = require(Path.join(__dirname, "..", "..", "..", "package.json")); for (let script of scripts) { From ae3f2a14cf6ce18047498d0d2369cbc19f597a91 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Fri, 16 Nov 2018 18:04:03 +0100 Subject: [PATCH 5/9] Reoder the dependencies --- package.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 562a7cda..ec67a201 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,16 @@ "test": "mocha", "prepare": "npm run compile" }, + "dependencies": { + "chalk": "^2.4.1", + "dedent": "^0.7.0", + "fs-extra": "^7.0.0", + "inquirer": "^6.2.0", + "lodash.camelcase": "^4.3.0", + "lodash.kebabcase": "^4.1.1", + "yeoman-generator": "^3.1.1", + "yosay": "^2.0.2" + }, "devDependencies": { "@types/dedent": "^0.7.0", "@types/fs-extra": "^5.0.4", @@ -43,15 +53,5 @@ "typescript-tslint-plugin": "0.0.5", "yeoman-test": "^1.9.1", "yo": "^2.0.5" - }, - "dependencies": { - "chalk": "^2.4.1", - "dedent": "^0.7.0", - "fs-extra": "^7.0.0", - "inquirer": "^6.2.0", - "lodash.camelcase": "^4.3.0", - "lodash.kebabcase": "^4.1.1", - "yeoman-generator": "^3.1.1", - "yosay": "^2.0.2" } } From 9e4e78f5f3b965d328273112a65d5ad71e6cb453 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sun, 18 Nov 2018 18:38:48 +0100 Subject: [PATCH 6/9] Add typescript-files to the ignore-files --- templates/app/.npmignore.ejs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/app/.npmignore.ejs b/templates/app/.npmignore.ejs index aec89b6b..069cb659 100644 --- a/templates/app/.npmignore.ejs +++ b/templates/app/.npmignore.ejs @@ -63,6 +63,10 @@ typings/ # Source-files [Ss]rc/ +# TypeScript config-files +tsconfig.json +tslint.json + # Unit-Tests test/ [Ll]ib/tests From 7e6764abfd17e6e5ef39417db11d22a0e7a1da7a Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Mon, 19 Nov 2018 22:30:57 +0100 Subject: [PATCH 7/9] Add a changelog-entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ed16fc5..48cb0a65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## TSGeneratorGenerator v1.2.3 - Improved the `package.json`-template + - Reworked the ignore-files [Show differences][v1.2.3] From 8f7485b7796dc79f3e9341c8cd54ef0e012f119b Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Mon, 19 Nov 2018 22:49:09 +0100 Subject: [PATCH 8/9] Increase the version-number --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 34fcd8af..823fdfb9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "generator-ts-generator", - "version": "1.2.2", + "version": "1.2.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index ec67a201..d3dedbf4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "generator-ts-generator", - "version": "1.2.2", + "version": "1.2.3", "description": "A Generator for Yeoman Generators Written in TypeScript.", "author": "Manuel Thalmann ", "license": "MIT", From 90bd27b66e0c47048e43c260191489c09e0f2c06 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Mon, 19 Nov 2018 23:00:02 +0100 Subject: [PATCH 9/9] Update all packages --- package-lock.json | 30 +++++++++++++++--------------- package.json | 10 +++++----- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/package-lock.json b/package-lock.json index 823fdfb9..57a4c8b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -104,9 +104,9 @@ "dev": true }, "@types/node": { - "version": "10.12.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.1.tgz", - "integrity": "sha512-i1sl+WCX2OCHeUi9oi7PiCNUtYFrpWhpcx878vpeq/tlZTKzcFdHePlyFHVbWqeuKN0SRPl/9ZFDSTsfv9h7VQ==", + "version": "10.12.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.9.tgz", + "integrity": "sha512-eajkMXG812/w3w4a1OcBlaTwsFPO5F7fJ/amy+tieQxEMWBlbV1JGSjkFM+zkHNf81Cad+dfIRA+IBkvmvdAeA==", "dev": true }, "@types/rx": { @@ -245,9 +245,9 @@ } }, "@types/yeoman-generator": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/yeoman-generator/-/yeoman-generator-3.0.0.tgz", - "integrity": "sha512-ocRnqXYWcHocuzHTkf8moeO4+5zoEjnAHAq0gj/u4kJwW8k/tcpMvj4KY+UA3uDS+GgBYAypan8zQrO/fxhBUQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/yeoman-generator/-/yeoman-generator-3.0.1.tgz", + "integrity": "sha512-Q5cx5lfH3jbGFhb8KpqHHOxL06NavoR4txD17uIgdSTQQ+zdiOl2VpJ260Yv9qRw+UgGGF9orKF/3IBkUtWIMA==", "dev": true, "requires": { "@types/inquirer": "*" @@ -1616,9 +1616,9 @@ } }, "fs-extra": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.0.tgz", - "integrity": "sha512-EglNDLRpmaTWiD/qraZn6HREAEAHJcJOmxNEYwq6xeMKnVMAy3GUcFB+wXt2C6k4CNvB/mP1y/U3dzvKKj5OtQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", "requires": { "graceful-fs": "^4.1.2", "jsonfile": "^4.0.0", @@ -7904,15 +7904,15 @@ "dev": true }, "typescript": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.1.5.tgz", - "integrity": "sha512-muYNWV9j5+3mXoKD6oPONKuGUmYiFX14gfo9lWm9ZXRHOqVDQiB4q1CzFPbF4QLV2E9TZXH6oK55oQ94rn3PpA==", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.1.6.tgz", + "integrity": "sha512-tDMYfVtvpb96msS1lDX9MEdHrW4yOuZ4Kdc4Him9oU796XldPYF/t2+uKoX0BBa0hXXwDlqYQbXY5Rzjzc5hBA==", "dev": true }, "typescript-tslint-plugin": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/typescript-tslint-plugin/-/typescript-tslint-plugin-0.0.5.tgz", - "integrity": "sha512-OfdDTiaaFBMbyaTSgnGAEGK5ixiMX/5DvggBHVQAjDiJlkPJoBSO47BGMW10CWP6FxIclzA/mvz0qAqK6Kpaag==", + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/typescript-tslint-plugin/-/typescript-tslint-plugin-0.1.0.tgz", + "integrity": "sha512-u33jyU0dIK74CP45+FSeBlaVDh8WVJbTPuNW5xCJ2PcwvoXgUwgKmjEk4QQn3GjmCbhJ78y9GkechpxL9XkLrQ==", "dev": true, "requires": { "minimatch": "^3.0.4", diff --git a/package.json b/package.json index d3dedbf4..43a2f31d 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "dependencies": { "chalk": "^2.4.1", "dedent": "^0.7.0", - "fs-extra": "^7.0.0", + "fs-extra": "^7.0.1", "inquirer": "^6.2.0", "lodash.camelcase": "^4.3.0", "lodash.kebabcase": "^4.1.1", @@ -42,15 +42,15 @@ "@types/lodash.camelcase": "^4.3.4", "@types/lodash.kebabcase": "^4.1.4", "@types/mocha": "^5.2.5", - "@types/node": "^10.12.1", - "@types/yeoman-generator": "^3.0.0", + "@types/node": "^10.12.9", + "@types/yeoman-generator": "^3.0.1", "@types/yeoman-test": "^1.7.4", "@types/yosay": "0.0.29", "mocha": "^5.2.0", "npm": "^6.4.1", "tslint": "^5.11.0", - "typescript": "^3.1.5", - "typescript-tslint-plugin": "0.0.5", + "typescript": "^3.1.6", + "typescript-tslint-plugin": "0.1.0", "yeoman-test": "^1.9.1", "yo": "^2.0.5" }