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

add-component

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

add-component - npm Package Compare versions

Comparing version 2.4.1 to 2.5.0

3

config.js

@@ -59,3 +59,4 @@ const path = require('path')

},
directory: './'
directory: './',
componentDirectory: true
}

@@ -33,2 +33,4 @@ #!/usr/bin/env node

customConfig = require(path.resolve(customConfigPath))
} else if (fs.existsSync(path.resolve('./.add-component/config.js'))) {
customConfig = require(path.resolve('./.add-component/config.js'))
}

@@ -126,3 +128,3 @@

function createComponent (name) {
const rootDirectory = path.join(path.resolve(config.directory), name)
const rootDirectory = config.componentDirectory ? path.join(path.resolve(config.directory), name) : path.resolve(config.directory)
const createStore = program.store

@@ -129,0 +131,0 @@

{
"name": "add-component",
"version": "2.4.1",
"version": "2.5.0",
"description": "Create React Component CLI",

@@ -5,0 +5,0 @@ "repository": {

@@ -148,5 +148,9 @@ # add-component

If you store your configuration file by `.add-component/config.js` path, you do not need any additional parameter. Just
Run the command as usual.
If you want your configuration file to have another name or be in another folder, tell the command where it is:
```
# Run with configuration
$ add-react-component --config .add-component/config.js Example
$ add-react-component --config configs/addcomponent-config.js Example

@@ -204,4 +208,22 @@ # Example of configuration

##### Path configuration
You can define a directory for your components. By default it is the root of your project.
```
module.exports = {
directory: './src'
}
```
You can choose not to have a directory for every component but put the files for all the components into the same source
folder. In this case, also configure the naming schemas for all the technologies so that all the files for different
components contain the component name and do not overwrite each other.
```
module.exports = {
componentDirectory: false
}
```
## License
MIT © [Jack Hanford](http://jackhanford.com)
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