@patternfly/create-element
Advanced tools
Comparing version 1.0.0-next.12 to 1.0.0-next.13
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
import Case from "case"; | ||
@@ -2,0 +3,0 @@ import Chalk from "chalk"; |
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
import { mkdir, readFile, stat, writeFile } from "fs/promises"; | ||
@@ -2,0 +3,0 @@ export { readFile, writeFile }; |
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
export function memoize(fn) { | ||
@@ -2,0 +3,0 @@ if (!fn) { |
75
main.js
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
import { generateElement } from "./generator/element.js"; | ||
@@ -59,38 +60,40 @@ import Chalk from "chalk"; | ||
export async function main() { | ||
return Promise.resolve(Yargs(process.argv).scriptName("npm init @patternfly/element").usage("$0 [<cmd>] [args]").option("directory", { | ||
type: "string", | ||
default: process.cwd(), | ||
demandOption: false, | ||
description: "Output directory" | ||
}).option("silent", { | ||
type: "boolean", | ||
default: false, | ||
description: "Do not log anything to stdout" | ||
}).option("tagName", { | ||
alias: "n", | ||
type: "string", | ||
description: "Custom element tag name. e.g. `pfe-button`" | ||
}).option("scope", { | ||
alias: "s", | ||
type: "string", | ||
description: "NPM package scope. e.g. `@patternfly`" | ||
}).option("overwrite", { | ||
type: "boolean", | ||
default: false, | ||
description: "Overwrite files without prompting" | ||
}).option("monorepo", { | ||
type: "boolean", | ||
default: await isMonorepo(), | ||
description: "Generate an npm package for the element" | ||
}).option("css", { | ||
type: "boolean", | ||
default: await isMonorepo() ? "scss" : "css", | ||
description: "Which type of CSS files to output" | ||
}).help().check(({ name }) => { | ||
if (typeof name === "string" && !name.includes("-")) { | ||
throw new Error(ERR_BAD_CE_TAG_NAME); | ||
} else { | ||
return true; | ||
} | ||
})).then(({ argv }) => argv).then(promptForElementGeneratorOptions).then(generateElement); | ||
return Promise.resolve( | ||
Yargs(process.argv).scriptName("npm init @patternfly/element").usage("$0 [<cmd>] [args]").option("directory", { | ||
type: "string", | ||
default: process.cwd(), | ||
demandOption: false, | ||
description: "Output directory" | ||
}).option("silent", { | ||
type: "boolean", | ||
default: false, | ||
description: "Do not log anything to stdout" | ||
}).option("tagName", { | ||
alias: "n", | ||
type: "string", | ||
description: "Custom element tag name. e.g. `pfe-button`" | ||
}).option("scope", { | ||
alias: "s", | ||
type: "string", | ||
description: "NPM package scope. e.g. `@patternfly`" | ||
}).option("overwrite", { | ||
type: "boolean", | ||
default: false, | ||
description: "Overwrite files without prompting" | ||
}).option("monorepo", { | ||
type: "boolean", | ||
default: await isMonorepo(), | ||
description: "Generate an npm package for the element" | ||
}).option("css", { | ||
type: "boolean", | ||
default: await isMonorepo() ? "scss" : "css", | ||
description: "Which type of CSS files to output" | ||
}).help().check(({ name }) => { | ||
if (typeof name === "string" && !name.includes("-")) { | ||
throw new Error(ERR_BAD_CE_TAG_NAME); | ||
} else { | ||
return true; | ||
} | ||
}) | ||
).then(({ argv }) => argv).then(promptForElementGeneratorOptions).then(generateElement); | ||
} |
{ | ||
"name": "@patternfly/create-element", | ||
"version": "1.0.0-next.12", | ||
"version": "1.0.0-next.13", | ||
"description": "Scaffold web components monorepos based on PatternFly Elements", | ||
@@ -56,9 +56,9 @@ "author": "Benny Powers <bennyp@redhat.com>", | ||
"dependencies": { | ||
"case": "^1.6.3", | ||
"chalk": "^5.0.0", | ||
"execa": "^6.1.0", | ||
"ncp": "^2.0.0", | ||
"prompts": "^2.4.2", | ||
"tslib": "^2.4.0", | ||
"yargs": "^17.2.1" | ||
"case": "1.6.3", | ||
"chalk": "5.0.1", | ||
"execa": "6.1.0", | ||
"ncp": "2.0.0", | ||
"prompts": "2.4.2", | ||
"tslib": "2.4.0", | ||
"yargs": "17.5.1" | ||
}, | ||
@@ -65,0 +65,0 @@ "directories": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19974
447
+ Addedchalk@5.0.1(transitive)
+ Addedcliui@7.0.4(transitive)
+ Addedtslib@2.4.0(transitive)
+ Addedyargs@17.5.1(transitive)
- Removedchalk@5.3.0(transitive)
- Removedcliui@8.0.1(transitive)
- Removedtslib@2.7.0(transitive)
- Removedyargs@17.7.2(transitive)
Updatedcase@1.6.3
Updatedchalk@5.0.1
Updatedexeca@6.1.0
Updatedncp@2.0.0
Updatedprompts@2.4.2
Updatedtslib@2.4.0
Updatedyargs@17.5.1