create-react-class
Advanced tools
Comparing version 1.1.1 to 1.2.0
@@ -6,10 +6,17 @@ | ||
var importReact = "import React, { Component, PropTypes } from 'react'; \n\n"; | ||
var classDeclaration = `class ${className} extends Component { } \n\n`; | ||
var classDeclaration = `class ${className} extends Component { \n\n`; | ||
var constructor = 'constructor(props) { super(props); } \n\n'; | ||
var render = 'render() { return ( <div> </div> ); } \n\n} \n\n'; | ||
var propTypes = `${className}.propTypes = { } \n\n` | ||
var exportDefault = `export default ${className};` | ||
return importReact.concat(classDeclaration).concat(propTypes).concat(exportDefault); | ||
return importReact.concat(classDeclaration) | ||
.concat(constructor) | ||
.concat(render) | ||
.concat(propTypes) | ||
.concat(exportDefault); | ||
} | ||
exports.createReactClassStructure = createReactClassStructure; |
{ | ||
"name": "create-react-class", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "Node module to create the react class structure", | ||
@@ -5,0 +5,0 @@ "bin": { |
# Create react class | ||
Create react class is a module to quickly create a react class. You can find him in the npm site [create-react-class](https://www.npmjs.com/package/create-react-class). | ||
Create react class is a module to quickly create a ES6 react class. You can find him in the npm site [create-react-class](https://www.npmjs.com/package/create-react-class). | ||
@@ -35,2 +35,10 @@ ### Installation | ||
### Example | ||
```sh | ||
$ reate-react-class --class MyClass | ||
``` | ||
![alt tag](http://image.prntscr.com/image/24ac41da59e5477ea87e9d4916d8476b.png) | ||
### Validations | ||
@@ -37,0 +45,0 @@ |
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
8316
130
54