Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

πŸ‘¨πŸ»β€πŸ­ create-app for any occasion

Notifications You must be signed in to change notification settings

maticzav/creato

Repository files navigation

creato

CircleCI codecov npm version

create-app for any occasion.

creato helps you build create-app tool to help your customers scaffold their project more easily and more quickly.

Overview

  • βœ‚οΈ Flexible: Packs core functions as well as the out-of-the-box solution.
  • 🌈 Easy to use: Exposes intuitive API!
  • 🐢 Friendly UI: Question and Answer flow leads thorough template installation!

Installation

yarn add creato

Example

import { creato, Template } from 'creato'
import * as meow from 'meow'
const cli = meow(
 `
create-boilerplates

> Helps you start with the project more quickly and more easily.

Options:
 --force Force the installation in directory.
`,
 {
 flags: {
 force: {
 type: 'boolean',
 default: false,
 },
 },
 },
)
const templates: Template[] = [
 {
 name: 'json',
 description: 'JSON template with basic CircleCI config.',
 repo: {
 uri: 'https://github.com/maticzav/label-sync',
 branch: 'master',
 path: '/examples/with-circleci',
 },
 },
]
creato(templates, {
 force: cli.flags.force,
})

API

/* templates */
interface Template {
 name: string
 description: string
 repo: TemplateRepository
}
interface TemplateRepository {
 uri: string
 branch: string
 path: string
}
/* creato */
interface Options {
 force: boolean
}
function creato(templates: Template[], options: Options): Promise<void>
/* core */
function loadTemplate(
 template: Template,
 output: string,
): Promise<
 { status: 'ok'; message: string } | { status: 'err'; message: string }
>

License

MIT @ Matic Zavadlal

About

πŸ‘¨πŸ»β€πŸ­ create-app for any occasion

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 5

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /