From b4b30eb5bcfb4cbf27f82457d7e7a614dce63043 Mon Sep 17 00:00:00 2001 From: Claas Ahlrichs Date: Mon, 4 Feb 2019 15:58:21 +0100 Subject: [PATCH] fixed start script and create commit to git repo --- package-lock.json | 53 ----------------------------------------------- package.json | 1 - src/index.ts | 15 ++++++++++---- 3 files changed, 11 insertions(+), 58 deletions(-) diff --git a/package-lock.json b/package-lock.json index c2fa741..1228e31 100644 --- a/package-lock.json +++ b/package-lock.json @@ -41,11 +41,6 @@ "color-convert": "^1.9.0" } }, - "arg": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.0.tgz", - "integrity": "sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg==" - }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -115,11 +110,6 @@ "concat-map": "0.0.1" } }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" - }, "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", @@ -533,11 +523,6 @@ "yallist": "^2.1.2" } }, - "make-error": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", - "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==" - }, "marky": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/marky/-/marky-1.2.1.tgz", @@ -974,20 +959,6 @@ "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==" }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "source-map-support": { - "version": "0.5.10", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.10.tgz", - "integrity": "sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ==", - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, "spdx-correct": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", @@ -1047,25 +1018,6 @@ "resolved": "https://registry.npmjs.org/to-utf8/-/to-utf8-0.0.1.tgz", "integrity": "sha1-0Xrqcv8vujm55DYBvns/9y4ImFI=" }, - "ts-node": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.2.tgz", - "integrity": "sha512-MosTrinKmaAcWgO8tqMjMJB22h+sp3Rd1i4fdoWY4mhBDekOwIAKI/bzmRi7IcbCmjquccYg2gcF6NBkLgr0Tw==", - "requires": { - "arg": "^4.1.0", - "diff": "^3.1.0", - "make-error": "^1.1.1", - "source-map-support": "^0.5.6", - "yn": "^3.0.0" - }, - "dependencies": { - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==" - } - } - }, "typescript": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.1.tgz", @@ -1120,11 +1072,6 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" - }, - "yn": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.0.0.tgz", - "integrity": "sha512-+Wo/p5VRfxUgBUGy2j/6KX2mj9AYJWOHuhMjMcbBFc3y54o9/4buK1ksBvuiK01C3kby8DH9lSmJdSxw+4G/2Q==" } } } diff --git a/package.json b/package.json index 6420d3f..b831e12 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,6 @@ "node-fetch": "^2.3.0", "prettier": "^1.16.3", "pretty-quick": "^1.10.0", - "ts-node": "^8.0.2", "typescript": "^3.3.1" } } diff --git a/src/index.ts b/src/index.ts index 1b710a6..7923732 100644 --- a/src/index.ts +++ b/src/index.ts @@ -47,6 +47,9 @@ init(dir, initFile, configData, function(_er, data) { ); (async () => { + git.plugins.set("fs", fs); + await git.init({ dir }); + await execa("npm", ["install", "typescript", "@types/node", "--save-dev"]); await execa("tsc", ["--init", "--outDir", "build"]); await execa("npm", [ @@ -54,6 +57,7 @@ init(dir, initFile, configData, function(_er, data) { "prettier", "pretty-quick", "husky", + "ts-node", "--save-dev" ]); @@ -65,15 +69,18 @@ init(dir, initFile, configData, function(_er, data) { fs.writeFileSync( dir + "/src/hello-world.ts", `// happy coding 👻 -console.log("hello world"); - ` + console.log("hello world");` ); - git.plugins.set("fs", fs); - await git.init({ dir }); await git.add({ dir, filepath: ".gitignore" }); await git.add({ dir, filepath: "package.json" }); await git.add({ dir, filepath: "package-lock.json" }); await git.add({ dir, filepath: "tsconfig.json" }); + await git.add({ dir, filepath: "src/hello-world.ts" }); + await git.commit({ + dir, + message: "Initial Commit 👻", + author: { name: "create-typescript-project", email: "no-email@inter.net" } + }); })(); });