@pijma/infra v5.0.0
@pijma/infra
Dev dependencies and utils
Component generator
Usage
# Don't forget to run yarn install after creation
yarn infra:create <kebab-case or CamelCase package name> <path = '.'> <template = 'component'>
yarn infra:create component-name ../components
template
is a directory name in ./src/main/tpl/create-package.
To add a template create a directory in ./src/main/tpl/create-package and place there template files.
Templates use lodash-like syntax to inject data:
import React from 'react'
export type <%= capitalizedName %>Props = {
}
export const <%= capitalizedName %>: React.FC<<%= capitalizedName %>Props> = (props) => {
return null
}
Available constants to inject: infraPath
, name
, capitalizedName
, description
, rootPath
, tplPath
.
Only files with .template
extension in the end of filename are enriched. Others are copied as is.
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago