npm.io
0.3.8 • Published 5 years agoCLI

@compgen/code-quality

Licence
MIT
Version
0.3.8
Deps
5
Size
16 kB
Vulns
0
Weekly
0

@compgen/code-quality

A robust generator for installing your favorite code quality tools for your project.

Micro Generators Included

CLI

I highly recommend using npx so that you don't have to install anything globally, and you can always get the latest version from npm.

  • optional --path=target_folder
npx @compgen/code-quality
Programmatically

You have to generate JSON schema and use execute function from @compgen/core:

// src/index.ts
import {
  execute,
  AppType,
  askAppType,
  getProjectFolder,
} from '@compgen/core'
import { createSchema } from '@compgen/code-quality'

const generate = async () => {
  const projectFolder = getProjectFolder() ?? '.'
  const appType = await askAppType()

  const codeQualitySchema = createSchema({ appType })
  await execute(codeQualitySchema, projectFolder)
}

generate()

Now all you have to do is run:

ts-node src/index.ts