Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ $ create-component-app --config path/to/your/config.json

**Passing a config file via the CLI overrides the configuration file loaded by [cosmiconfig](https://github.com/davidtheclark/cosmiconfig)**

### You can pass params from the command line

```sh
$ create-component-app --path path/destionation
```

**Passing a param via the CLI overrides the configuration file loaded by [cosmiconfig](https://github.com/davidtheclark/cosmiconfig)**

### You can use your own custom templates

Simple steps to create your own templates [docs/custom-templates](https://github.com/CVarisco/create-component-app/blob/master/docs/CUSTOM-TEMPLATES.md)
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-component-app",
"version": "1.4.2",
"version": "1.5.0",
"description": "Tool to generate different types of React components from the terminal.",
"bin": {
"create-component-app": "./dist/index.js"
Expand Down
1 change: 0 additions & 1 deletion src/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ function generateFileName(newFilePath, newFileName, templateFileName) {
if (templateFileName.includes('COMPONENT_NAME')) {
return templateFileName.replace(/COMPONENT_NAME/g, newFileName)
}
console.log(templateFileName)
return templateFileName
}

Expand Down
5 changes: 4 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ import {
import { questions } from './questions'

const args = yargs.argv
const config = getConfig(args.config)
const config = {
...getConfig(args.config),
...args,
}

async function getTemplatesPath(templateName = null) {
const { templatesDirPath } = config
Expand Down