Skip to content

Commit 00ff0fa

Browse files
author
Alex Lee
authored
Merge pull request #14 from alexlee-dev/v0.7.0
📦 v0.7.0
2 parents d592361 + e933dc4 commit 00ff0fa

9 files changed

Lines changed: 49 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.7.0] - 2020-06-01
9+
10+
### ✏️ Better Logging
11+
12+
### Added
13+
14+
- Confirmed OS's in README
15+
16+
### Changed
17+
18+
- Update Notifier will now use version from installed package.json
19+
- Slightly more robust logging on error
20+
- Spinner fail and then log on next line
21+
22+
### Removed
23+
24+
### Fixed
25+
26+
- `slant` in TypeScript not recognized as `Slant`
27+
828
## [0.6.0] - 2020-06-01
929

1030
### 🐛 The Bug Squasher

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ I generally use a template when developing CLI applications for myself. I want t
4242
- Node (>= v10.0.0)
4343
- NPM
4444

45+
### OS
46+
47+
[x] MacOS
48+
[x] Linux
49+
[ ] Windows (Currently unstable. Attempting to fix)
50+
4551
### Installing
4652

4753
`npm install -g create-cli-application`

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-cli-application",
3-
"version": "0.6.0",
3+
"version": "0.7.0",
44
"description": "A bootstrapper for creating a cli application with Node.",
55
"bin": {
66
"create-cli-application": "./index.js"

src/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ import chalk from "chalk";
33
import commander from "commander";
44
import inquirer from "inquirer";
55
import updateNotifier from "update-notifier";
6+
import pkg from "../package.json";
67

78
/**
89
* Initialize Sentry
910
*/
1011
Sentry.init({
1112
dsn:
1213
"https://55c913cc3d394f71ba669fda095698fd@o202486.ingest.sentry.io/5254191",
13-
release: "0.6.0",
14+
release: "0.7.0",
1415
});
1516

1617
import {
@@ -46,7 +47,7 @@ const main = async (): Promise<void> => {
4647
* The program that parses the initial user input
4748
*/
4849
const program = new commander.Command("create-cli-application")
49-
.version("0.6.0")
50+
.version("0.7.0")
5051
.arguments("<application-name>")
5152
.usage(`${chalk.blueBright("<application-name>")} [options]`)
5253
.action((name) => {
@@ -145,7 +146,7 @@ const main = async (): Promise<void> => {
145146
updateNotifier({
146147
pkg: {
147148
name: "create-cli-application",
148-
version: "0.6.0", // TODO - This won't ever update. Need to use package.json
149+
version: pkg.version,
149150
},
150151
}).notify();
151152
} catch (error) {

src/init.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export const createProjectDirectory = async (
6666
);
6767
} catch (error) {
6868
spinner.fail();
69+
console.log("")
6970
throw new Error(error);
7071
}
7172
};
@@ -92,6 +93,7 @@ export const installDependencies = async (
9293
spinner.succeed("Dependencies installed successfully");
9394
} catch (error) {
9495
spinner.fail();
96+
console.log("")
9597
throw new Error(error);
9698
}
9799
};
@@ -127,6 +129,7 @@ export const installDevDependencies = async (
127129
spinner.succeed("DevDependencies installed successfully");
128130
} catch (error) {
129131
spinner.fail();
132+
console.log("")
130133
throw new Error(error);
131134
}
132135
};
@@ -187,6 +190,7 @@ export const copyTemplateFiles = async (
187190
spinner.succeed("Template files copied successfully");
188191
} catch (error) {
189192
spinner.fail();
193+
console.log("")
190194
throw new Error(error);
191195
}
192196
};
@@ -238,6 +242,7 @@ export const replaceTemplateValues = async (
238242
spinner.succeed("Values in template files replaced successfully");
239243
} catch (error) {
240244
spinner.fail();
245+
console.log("")
241246
throw new Error(error);
242247
}
243248
};
@@ -278,6 +283,7 @@ export const createTSConfig = async (
278283
spinner.succeed("tsconfig.json created successfully");
279284
} catch (error) {
280285
spinner.fail();
286+
console.log("")
281287
throw new Error(error);
282288
}
283289
};

src/template/ts/src/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const titleScreen = (title: string): Promise<void> =>
5959
new Promise(async (resolve, reject) => {
6060
try {
6161
const text: string = await figletPromise(title, {
62-
font: "slant",
62+
font: "Slant",
6363
});
6464

6565
clear();

src/util.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,19 @@ export const executeCommand = async (
2020
const cp = spawn(command, args, options);
2121
cp.on("error", (err: Error) => {
2222
if (err) {
23-
console.log({ command, args, options });
23+
console.log("");
24+
console.error(JSON.stringify({ err, command, args, options }, null, 2));
25+
console.log("");
2426
reject(err.message);
2527
}
2628
});
2729
cp.on("exit", (code: number | null, signal) => {
2830
if (code !== 0) {
31+
console.log("");
32+
console.error(
33+
JSON.stringify({ args, command, code, signal, options }, null, 2)
34+
);
35+
console.log("");
2936
reject({ args, command, code, signal, options });
3037
}
3138
resolve();

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@
6464

6565
/* Advanced Options */
6666
"skipLibCheck": true /* Skip type checking of declaration files. */,
67-
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
67+
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */,
68+
"resolveJsonModule": true
6869
},
6970
"include": ["./src/index.ts"]
7071
}

0 commit comments

Comments
 (0)