Socket
Socket
Sign inDemoInstall

@patternfly/create-element

Package Overview
Dependencies
Maintainers
16
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@patternfly/create-element - npm Package Compare versions

Comparing version 1.0.0-next.12 to 1.0.0-next.13

1

generator/element.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc