@hooked74/create-library
v2.2.4
Published
Set up a library by running one command
Downloads
2
Maintainers
Readme
This application generates a starter library kit.
Table of contents
Usage
npx @hooked74/create-library [<name>]
name is optional parameter.
Command Options
-c, --config <json|file>
Transfer partial or full configuration in json format or in file format for library generation.
-f, --force
Generate library with default configuration options (from default-config.json file).
-e, --extended
Force you to select advanced options in the interactive menu: react, storybook, cypress. By default these options are true.
Configuration
The configuration has the following structure:
{
"name": "my-library",
"scope": "hooked74",
"author": "Igor Novikov",
"email": "[email protected]",
"repoAuthor": "Hooked74",
"repoName": "my-library",
"typePrefix": "H74",
"react": true,
"storybook": true,
"cypress": true
}
name
It is used for: creating a local directory, generating a package name, generating a repository name (if repoName is not used), generating the main type namespace, generating final assembly files, etc. It is a required parameter.
scope
It is used to generate the full package name. It is a optional parameter.
author
It is used to generate author in package.json and generate license. It is a optional parameter.
It is used to generate author in package.json and for feedback in travis-ci configuration. It is a optional parameter.
repoAuthor
It is used to generate the full repository name in many parts of the environment. It is a required parameter.
repoName
It is used to generate the full repository name in many parts of the environment. It is a optional parameter (if not specified then name will be used).
typePrefix
It is used to generate standard type namespace alias. It is necessary to avoid type intersection in a global scope. It is a optional parameter.
react
Flag that is responsible for using React and everything related to it in the created project. Default: true.
storybook
Flag that is responsible for using Storybook and everything related to it in the created project. Default: true.
cypress
Flag that is responsible for using Cypress and everything related to it in the created project. Default: true.