BanzaiMan / lift-javascript

lift enhancer for details specific to the JavaScript language

Home Page:https://npm.im/@form8ion/lift-javascript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lift-javascript

lift enhancer for details specific to the JavaScript language

Build 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({
      results: {dependencies: [], devDependencies: [], scripts: {}, eslintConfigs: []},
      projectRoot
    });
  }
})();

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

About

lift enhancer for details specific to the JavaScript language

https://npm.im/@form8ion/lift-javascript

License:MIT License


Languages

Language:JavaScript 89.6%Language:Gherkin 10.4%