Giter Site home page Giter Site logo

creato's Introduction

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

creato's People

Contributors

elliottsj avatar maticzav avatar renovate-bot avatar renovate[bot] avatar wtrocki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

wtrocki

creato's Issues

Can't load ./cmds plugin:Error: Cannot find module 'tmp'

I am getting this error using graphql-cli, which uses creato:

> graphql get-schema --insecure

Can't load ./cmds plugin:Error: Cannot find module 'tmp'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/Users/spencerelliott/Dev/path/to/common/temp/node_modules/.registry.npmjs.org/creato/1.0.3/node_modules/creato/src/loader.ts:2:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/Users/spencerelliott/Dev/path/to/common/temp/node_modules/.registry.npmjs.org/creato/1.0.3/node_modules/creato/src/creato.ts:9:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/Users/spencerelliott/Dev/path/to/common/temp/node_modules/.registry.npmjs.org/creato/1.0.3/node_modules/creato/src/index.ts:1:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Cannot find preset's package (github>whitesource/merge-confidence:beta)

Errors when using creato

Getting different types of errors. Refer to picture below for specific errors and details.

OS: Manjaro
Node Version: 10.15.0

image

default template

Chose default template if none accepted in case there's a template with name "default" in the template list.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm @types/mkdirp Unavailable
npm @types/ora Unavailable
npm @types/rimraf Unavailable
npm codecov Unavailable
npm request Unavailable
npm tslint Unavailable
npm tslint-config-standard Unavailable

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • fix(deps): update dependency parse-github-url to v1.0.3
  • chore(deps): update dependency @types/inquirer to v9
  • chore(deps): update dependency @types/rimraf to v4
  • chore(deps): update dependency husky to v9
  • chore(deps): update dependency npm-run-all2 to v6
  • chore(deps): update dependency prettier to v3
  • chore(deps): update dependency pretty-quick to v4
  • chore(deps): update dependency rimraf to v6
  • chore(deps): update dependency tslint to v6
  • chore(deps): update dependency typescript to v5
  • fix(deps): update dependency inquirer to v10
  • fix(deps): update dependency mkdirp to v3
  • fix(deps): update dependency ora to v8
  • fix(deps): update dependency update-notifier to v7
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

npm
package.json
  • chalk ^2.4.2
  • inquirer ^7.0.0
  • mkdirp ^0.5.1
  • ora ^4.1.1
  • parse-github-url ^1.0.2
  • request ^2.88.0
  • tar ^6.0.0
  • tmp ^0.2.0
  • update-notifier ^3.0.0
  • @types/inquirer 6.5.0
  • @types/jest 24.9.1
  • @types/mkdirp 0.5.2
  • @types/node 12.20.55
  • @types/ora 3.2.0
  • @types/parse-github-url 1.0.3
  • @types/request 2.48.12
  • @types/rimraf 2.0.5
  • @types/tar 4.0.5
  • @types/tmp 0.2.6
  • @types/update-notifier 2.5.2
  • codecov 3.8.3
  • husky 3.1.0
  • jest 24.9.0
  • npm-run-all2 5.0.2
  • prettier 1.19.1
  • pretty-quick 2.0.2
  • rimraf 3.0.2
  • semantic-release 15.14.0
  • ts-jest 24.3.0
  • ts-node 8.10.2
  • tslint 5.20.1
  • tslint-config-prettier 1.18.0
  • tslint-config-standard 8.0.1
  • typescript 3.9.10

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.