form8ion / javascript-scaffolder

opinionated scaffolder for JavaScript projects
https://npm.im/@travi/javascript-scaffolder
MIT License
3 stars 2 forks source link

javascript-scaffolder

opinionated scaffolder for JavaScript projects

REPLACED BY @form8ion/javascript

Codecov Node CI Workflow Status

Table of Contents

Features

Usage

npm node MIT license

Installation

$ npm install @travi/javascript-scaffolder --save-prod

As one of the languages for scaffolding a project

This scaffolder is intended to be used to scaffold the language specific details within the project-scaffolder.

Example

Dependencies:
const {dialects, projectTypes} = require('@form8ion/javascript-core');
const {scaffold: scaffoldJavaScript, questionNames} = require('./lib/index.cjs');
Execute
(async () => {
  const accountName = 'form8ion';

  await scaffoldJavaScript({
    projectRoot: process.cwd(),
    projectName: 'project-name',
    visibility: 'Public',
    license: 'MIT',
    configs: {
      eslint: {scope: `@${accountName}`},
      remark: `@${accountName}/remark-lint-preset`,
      babelPreset: {name: `@${accountName}`, packageName: `@${accountName}/babel-preset`},
      commitlint: {name: `@${accountName}`, packageName: `@${accountName}/commitlint-config`}
    },
    overrides: {npmAccount: accountName},
    ciServices: {},
    unitTestFrameworks: {},
    decisions: {
      [questionNames.DIALECT]: dialects.BABEL,
      [questionNames.NODE_VERSION_CATEGORY]: 'LTS',
      [questionNames.PACKAGE_MANAGER]: 'npm',
      [questionNames.PROJECT_TYPE]: projectTypes.PACKAGE,
      [questionNames.SHOULD_BE_SCOPED]: true,
      [questionNames.SCOPE]: accountName,
      [questionNames.AUTHOR_NAME]: 'Your Name',
      [questionNames.AUTHOR_EMAIL]: 'you@domain.tld',
      [questionNames.AUTHOR_URL]: 'https://your.website.tld',
      [questionNames.UNIT_TESTS]: true,
      [questionNames.INTEGRATION_TESTS]: true
    }
  });
})();

Options

projectRoot string (required)

path to the root of the project

projectName string (required)

name of the project (w/o a scope)

visibility string (required)

visibility of the project (Public or Private)

license string (required)
vcs object (required)
description string (optional)

short summary of the project

configs object (optional)
overrides object (optional)
registries object (optional)
ciServices object (optional)
applicationTypes object (optional)
unitTestFrameworks object (required)

frameworks to be passed to the unit-testing scaffolder

Contributing

Conventional Commits Commitizen friendly semantic-release PRs Welcome Renovate

Dependencies

$ nvm install
$ npm install

Verification

$ npm test

Related Projects