From 881bd58686eb101e6bcb7da1b04eeffaa8ceff39 Mon Sep 17 00:00:00 2001 From: chimurai <655241+chimurai@users.noreply.github.com> Date: Thu, 28 Nov 2019 22:41:21 +0100 Subject: [PATCH] feat(init): confirm scaffolded config after init --- package.json | 4 ++-- requirements.config.js | 13 ------------- src/scaffold.ts | 4 ++++ 3 files changed, 6 insertions(+), 15 deletions(-) delete mode 100644 requirements.config.js diff --git a/package.json b/package.json index eb0205d..a57f916 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "requirements", - "version": "1.3.0", + "version": "1.3.1", "license": "MIT", "author": "chimurai", "homepage": "https://github.com/chimurai/requirements", @@ -9,7 +9,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/chimurai/requirements.git" + "url": "git+https://github.com/chimurai/requirements.git" }, "keywords": [ "requirements", diff --git a/requirements.config.js b/requirements.config.js deleted file mode 100644 index acbfc66..0000000 --- a/requirements.config.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = { - software: { - node: '^12.10.0', - nginx: { - semver: '^666.x', - optional: true // won't fail if missing or wrong version - } - // httpd: { - // semver: '^2.x', - // flag: '-v' // custom flag to print version - // }, - } -}; diff --git a/src/scaffold.ts b/src/scaffold.ts index b4a0bfd..2ab1f3f 100644 --- a/src/scaffold.ts +++ b/src/scaffold.ts @@ -1,5 +1,6 @@ import * as fs from 'fs'; import * as semver from 'semver'; +import * as chalk from 'chalk'; const FILENAME = 'requirements.config.js'; @@ -23,6 +24,9 @@ export function scaffold() { } fs.writeFileSync(FILENAME, TEMPLATE); + + const filepath = `${process.cwd()}/${FILENAME}`; + console.log(chalk.dim(`Created config: ${filepath}`)); } function hasExistingConfig() {