Skip to content

Commit

Permalink
chore(npm): update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
wessberg committed Nov 10, 2019
1 parent 0cbdf74 commit 9c58711
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 39 deletions.
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: wessberg
patreon: wessberg
26 changes: 11 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@
"description": "A virtual Open Source project maintainer",
"scripts": {
"generate:changelog": "standard-changelog --first-release",
"generate:readme": "bin/scaffold readme --yes",
"generate:license": "bin/scaffold license --yes",
"generate:contributing": "bin/scaffold contributing --yes",
"generate:coc": "bin/scaffold coc --yes",
"generate:funding": "bin/scaffold funding --yes",
"generate:all": "npm run generate:license && npm run generate:contributing && npm run generate:coc && npm run generate:readme && npm run generate:changelog",
"generate:scaffold": "bin/scaffold all --yes",
"generate:all": "npm run generate:scaffold && npm run generate:changelog",
"clean:dist": "rm -rf dist",
"clean:compiled": "rm -rf compiled",
"clean": "npm run clean:dist && npm run clean:compiled",
Expand Down Expand Up @@ -51,27 +47,27 @@
"@types/json5": "0.0.30",
"@types/prettier": "1.18.3",
"@types/yaml": "1.2.0",
"chalk": "2.4.2",
"commander": "3.0.2",
"chalk": "3.0.0",
"commander": "4.0.0",
"eslint": "6.6.0",
"inquirer": "7.0.0",
"json5": "2.1.1",
"yaml": "1.7.2",
"markdown-toc": "1.2.0",
"prettier": "1.18.2",
"tslint": "5.20.0"
"prettier": "1.19.1",
"tslint": "5.20.1"
},
"devDependencies": {
"@wessberg/rollup-plugin-ts": "1.1.73",
"@wessberg/rollup-plugin-ts": "1.1.74",
"@wessberg/ts-config": "0.0.42",
"ava": "2.4.0",
"husky": "3.0.9",
"magic-string": "^0.25.4",
"np": "5.1.2",
"pretty-quick": "2.0.0",
"rollup": "1.26.0",
"np": "5.1.3",
"pretty-quick": "2.0.1",
"rollup": "1.26.4",
"standard-changelog": "2.0.15",
"typescript": "3.6.4"
"typescript": "3.7.2"
},
"main": "./dist/index.js",
"module": "./dist/index.js",
Expand Down
3 changes: 1 addition & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ export default {
treeshake: true,
plugins: [
ts({
tsconfig: process.env.NODE_ENV === "production" ? "tsconfig.dist.json" : "tsconfig.json",
debug: true
tsconfig: process.env.NODE_ENV === "production" ? "tsconfig.dist.json" : "tsconfig.json"
})
],
external: [...Object.keys(packageJSON.dependencies), ...Object.keys(packageJSON.devDependencies), ...builtinModules]
Expand Down
14 changes: 8 additions & 6 deletions src/cli/command/finalize-commands/finalize-commands.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import commander from "commander";

commander.parse(process.argv);

// Show help if no arguments are given
if (commander.args.length === 0) {
commander.help(text => {
return `Welcome to Scaffold!\n\n` + text;
});
const lastArgv = process.argv.slice(-1)[0];
if (lastArgv.endsWith("scaffold")) {
// Show help if no arguments are given
if (commander.args.length === 0) {
commander.help(text => {
return `Welcome to Scaffold!\n\n` + text;
});
}
}
12 changes: 6 additions & 6 deletions src/cli/command/shared/shared-options.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
export const SHARED_OPTIONS = {
config: {
shortHand: "c",
type: "string" as "string",
type: "string",
description: "An (optional) path to the scaffold config to use"
},
debug: {
shortHand: "d",
type: "boolean" as "boolean",
type: "boolean",
description: "Whether to print debug information"
},
verbose: {
shortHand: "v",
type: "boolean" as "boolean",
type: "boolean",
description: "Whether to print verbose information"
},
silent: {
shortHand: "s",
type: "boolean" as "boolean",
type: "boolean",
description: "Whether to not print anything"
},
yes: {
shortHand: "y",
type: "boolean" as "boolean",
type: "boolean",
description: "Whether or not to auto-select 'yes' for all prompts"
}
};
} as const;
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import {SHARED_OPTIONS} from "../../command/shared/shared-options";

export type SanitizedSharedOptions<T = typeof SHARED_OPTIONS> = {
// @ts-ignore
[Key in keyof T]: T[Key]["type"] extends "boolean" ? boolean : T[Key]["type"] extends "number" ? number : string;
export type SanitizedSharedOptions = {
[Key in keyof typeof SHARED_OPTIONS]: typeof SHARED_OPTIONS[Key]["type"] extends "boolean"
? boolean
: typeof SHARED_OPTIONS[Key]["type"] extends "number"
? number
: string;
};
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
import {SHARED_OPTIONS} from "../../../command/shared/shared-options";
import {SanitizedSharedOptions} from "../sanitized-shared-options";

export type SelectLogLevelOptions<
T = Pick<
typeof SHARED_OPTIONS,
{[Key in keyof typeof SHARED_OPTIONS]: (typeof SHARED_OPTIONS[Key]["type"] extends "boolean" ? Key : never)}[keyof typeof SHARED_OPTIONS]
>
> = SanitizedSharedOptions<T>;
export type SelectLogLevelOptions = SanitizedSharedOptions;

0 comments on commit 9c58711

Please sign in to comment.