Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maticzav/creato
👨🏻🏭 create-app for any occasion
https://github.com/maticzav/creato
cli create-app npm yarn
Last synced: about 1 month ago
JSON representation
👨🏻🏭 create-app for any occasion
- Host: GitHub
- URL: https://github.com/maticzav/creato
- Owner: maticzav
- Created: 2018-12-11T15:31:52.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-05-28T07:17:29.000Z (7 months ago)
- Last Synced: 2024-05-28T14:38:47.617Z (7 months ago)
- Topics: cli, create-app, npm, yarn
- Language: TypeScript
- Homepage: https://github.com/maticzav/creato
- Size: 1.88 MB
- Stars: 24
- Watchers: 2
- Forks: 1
- Open Issues: 52
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# creato
[![CircleCI](https://circleci.com/gh/maticzav/creato/tree/master.svg?style=shield)](https://circleci.com/gh/maticzav/creato/tree/master)
[![codecov](https://codecov.io/gh/maticzav/creato/branch/master/graph/badge.svg)](https://codecov.io/gh/maticzav/creato)
[![npm version](https://badge.fury.io/js/creato.svg)](https://badge.fury.io/js/creato)> 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
```bash
yarn add creato
```## Example
```ts
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
```ts
/* 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
/* core */
function loadTemplate(
template: Template,
output: string,
): Promise<
{ status: 'ok'; message: string } | { status: 'err'; message: string }
>
```## License
MIT @ Matic Zavadlal