Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-creates

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-creates - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

templates/javascript/component/class/{{name}}.js

12

dist/scripts/component/index.js

@@ -29,7 +29,8 @@ "use strict";

.option("-t --type <component>", parse_type_1.MESSAGE, parse_type_1.Types.FUNCTION)
.option("-pt --prop-types", "Should to add Prop-types")
.option("-pt --prop-types", "Should add Prop-types")
.option("-f --function", "Generate function component")
.option("-c --class", "Generate class component")
.option("-s --style <styling>", "Selected the style", parse_style_1.Styles.CSS)
.action(async (name, _) => {
let { type, language, entry, style, scss, css, sass, propTypes, function: func, directory: target, } = _.opts();
let { type, language, entry, style, scss, css, sass, propTypes, function: func, directory: target, class: klass } = _.opts();
const styles = { scss, css, sass };

@@ -42,2 +43,5 @@ for (const [styleName, isOn] of Object.entries(styles)) {

}
if (Boolean(klass)) {
type = parse_type_1.Types.CLASS;
}
if (Boolean(func)) {

@@ -48,5 +52,5 @@ type = parse_type_1.Types.FUNCTION;

console.log(`
React Creates: ${chalk_1.default.blueBright.bold("Component")}
React Creates: ${chalk_1.default.blueBright.bold("Component")}
Parsing arguments...
Parsing arguments...
`);

@@ -53,0 +57,0 @@ const options = {

@@ -12,3 +12,3 @@ "use strict";

if (Boolean(value))
console.log(`⚛️ ${lodash_1.startCase(name)}: ${chalk_1.default.bold.green(value)}`);
console.log(` ⚛️ ${lodash_1.startCase(name)}: ${chalk_1.default.bold.green(value)}`);
}

@@ -15,0 +15,0 @@ console.log('');

@@ -8,4 +8,4 @@ "use strict";

exports.runCreateComponent = async (options) => {
const { target, language } = options;
const templatesPath = path_1.join(__dirname, "..", "..", "..", "templates", language, "component");
const { target, language, type } = options;
const templatesPath = path_1.join(__dirname, "..", "..", "..", "templates", language, "component", type);
await copy_template_1.copyTemplate(templatesPath, target);

@@ -12,0 +12,0 @@ await replace_variables_1.replaceVariables(target, options);

{
"name": "react-creates",
"version": "1.0.2",
"version": "1.0.3",
"description": "Create React Component folder works on macOS, Windows, and Linux.",

@@ -5,0 +5,0 @@ "files": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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