@form8ion/lift
v10.0.0
Published
tool for running sub-scaffolders on existing projects
Downloads
1,654
Readme
lift
tool for running sub-scaffolders on existing projects :aerial_tramway:
Table of Contents
Features
- Runs registered sub-scaffolders independantly of the project-scaffolder,
enabling existing projects to be lifted with additional functionality
- Injects badges from the sub-scaffolder results into the
README.md
as long as the existingREADME.md
lists the badges using the (fairly recent) zoning convention
- Injects badges from the sub-scaffolder results into the
- Modify existing
README.md
files to add badges - Apply lift enhancers for additional project-specific updates
Usage
Installation
$ npm install @form8ion/lift --save-prod
Example
Import
import {lift, questionNames} from '@form8ion/lift';
Execute
(async () => {
await lift({scaffolders: {}, decisions: {[questionNames.SCAFFOLDER]: 'foo'}, enhancers: {}});
})();
API
scaffolders
object (required)
- keys: string Name of each scaffolder
- values: function Does the scaffolding when executed
- receives an options object as the first argument
projectRoot
: string path of the working directory where the CLI command was executedvcs
: object details of the exisitng vcs and hostowner
: string owner of the vcs host accountname
: string name of the repository on the host
- receives an options object as the first argument
decisions
object (optional)
Answers for expected prompts, to enable consistent behavior while skipping those particular interactive prompts
- keys: string Name of each question
- values: mixed The answer to provide instead of being prompted interactively
enhancers
object (optional)
Additional lift processors to be applied to projects based on the result of applying the provided predicate function to the current project
- keys: string Name of each enhancer. Provided only for developer experience. Does not influence execution behavior.
- values: function Does the additional lifting when executed
- receives an options object as the first argument
projectRoot
: string path of the working directory where the CLI command was executedresults
: object results returned from executing the chosen sub-scaffoldervcs
: object details of the exisitng vcs and hostowner
: string owner of the vcs host accountname
: string name of the repository on the host
- receives an options object as the first argument
Contributing
Dependencies
$ nvm install
$ npm install
Verification
$ npm test