Skip to content
This repository has been archived by the owner on Dec 18, 2021. It is now read-only.
/ lift-javascript Public archive

lift enhancer for details specific to the JavaScript language

License

Notifications You must be signed in to change notification settings

form8ion/lift-javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lift-javascript

lift enhancer for details specific to the JavaScript language

REPLACED BY @form8ion/javascript

Node CI Workflow Status

Table of Contents

Features

  • Adds scripts to package.json from results

Coming Soon

  • Install dependencies from results
  • Configure eslint configs from results

Usage

MIT license npm Try @form8ion/lift-javascript on RunKit

Installation

$ npm install @form8ion/lift-javascript --save-prod

Example

Import

import {lift, test} from '@form8ion/lift-javascript';

Execute

const projectRoot = process.cwd();

(async () => {
  if (await test({projectRoot})) {
    await lift({
      projectRoot,
      configs: {eslint: {scope: '@foo'}},
      results: {
        dependencies: [],
        devDependencies: [],
        scripts: {},
        eslintConfigs: [],
        packageManager: 'npm'
      }
    });
  }
})();

API

test

predicate function that returns true when the project is a JavaScript project

Arguments:

projectRoot string (required)

path to the root of the project

lift

function that takes results from a JavaScript sub-scaffolder and applies the necessary changes to an existing project

Arguments:

projectRoot string (required)

path to the root of the project

results object (required)

results from sub-scaffolder

configs object (optional)

eslint object (optional)

Config details scaffolding for ESLint. eslintConfigs in results will only be processed if these details are provided.

scope string (required)

The npm scope to be used when installing and configuring use of shareable ESLint config packages.

Contributing

PRs Welcome Conventional Commits Commitizen friendly semantic-release Renovate

Dependencies

$ nvm install
$ npm install

Verification

$ npm test