Skip to content

Latest commit

 

History

History
183 lines (123 loc) · 5.64 KB

README.md

File metadata and controls

183 lines (123 loc) · 5.64 KB

lift

tool for running sub-scaffolders on existing projects 🚡

Node CI Workflow Status Codecov OpenSSF Scorecard SLSA Level 2

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 existing README.md lists the badges using the (fairly recent) zoning convention
  • Modify existing README.md files to add badges
  • Apply lift enhancers for additional project-specific updates

Usage

npm Try @form8ion/lift on RunKit MIT license node

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 executed
      • vcs: object details of the exisitng vcs and host
        • owner: string owner of the vcs host account
        • name: string name of the repository on the host

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 executed
      • results: object results returned from executing the chosen sub-scaffolder
      • vcs: object details of the exisitng vcs and host
        • owner: string owner of the vcs host account
        • name: string name of the repository on the host

Contributing

Conventional Commits Commitizen friendly semantic-release PRs Welcome Renovate

Dependencies

$ nvm install
$ npm install

Verification

$ npm test