@compgen/next-min

Unless you are building custom CRA generator then you probably want to use: @compgen/next

Usage no npm install needed!

<script type="module">
  import compgenNextMin from 'https://cdn.skypack.dev/@compgen/next-min';
</script>

README

@compgen/next-min

Unless you are building custom CRA generator then you probably want to use: @compgen/next

This is a micro generator for minimal CRA configuration.

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/next-min

Programmatically

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

// src/index.ts
import { execute, askProjectName } from '@compgen/core'
import { createSchema } from '@compgen/next-min'

const generate = async () => {
  const { projectFolder } = await askProjectName()

  const schema = createSchema({
    projectFolder,
  })
  await execute(schema, projectFolder)
}

generate()

Now all you have to do is run:

ts-node src/index.ts