Command-line for creating projects from templates.

Overview

@sxzz/create npm

Command-line for creating projects from templates.

Install

npm i -g @sxzz/create

Usage

cd /some/path/projects
create

Configuration

Most formats of configuration are supported. The configuration file is located in $HOME/.config/create.config.[js,json,yml]

TypeScript Schema

Run create config to modify config.

gitInit: true # optional, defaults to true

templates:
  - name: Library # must be unique
    # color: '#008800' # optional
    children:
      - name: TypeScript
        color: '#3178c6'
        url: '[email protected]:sxzz/node-lib-starter.git' # remote URL or local path
  - name: Web App
    url: xxxxx
    gitInit: false # overwrite global config

TODO

  • modify name in package.json and README.md
  • update deps

Sponsors

Credits

License

MIT License © 2022 三咲智子

You might also like...

Command line tool that converts HTML to markdown.

@wcj/html-to-markdown HTML conversion tool to markdown. command line tool = @wcj/html-to-markdown-cli. Installation This package is ESM only: Node 14

Nov 6, 2022

✨ A command-line interface for quickly sharing code snippets of your local files

✨ A command-line interface for quickly sharing code snippets of your local files

🦄 snipli ✨ A command-line interface for quickly sharing code snippets for your local files Usage Commands Usage $ npm install -g snipli $ snipli COMM

Nov 3, 2022

📸 A command-line tool to generate code images of your local code right away from the terminal

📸 A command-line tool to generate code images of your local code right away from the terminal

📸 rayli 📸 A command-line tool to generate code images of your local code right away from the terminal Usage Commands Usage $ npm install -g rayli $

Nov 4, 2022

✨ A command-line interface for quickly sharing code snippets of your local files

✨ A command-line interface for quickly sharing code snippets of your local files

🦄 snipli ✨ A command-line interface for quickly sharing code snippets for your local files Usage Commands Usage $ npm install -g snipli $ snipli COMM

May 11, 2022

🦄 A command line tool to get tokens on testnets quickly!

🦄 A command line tool to get tokens on testnets quickly!

🦄 faucetli 🦄 A command line tool to get tokens on testnets quickly! Usage Commands Usage $ npm install -g faucetli $ faucetli COMMAND running comman

May 11, 2022

Command-line toolkit for parsing, compiling, transpiling, optimizing, linking, dataizing, and running EOLANG programs

First, you install npm and Java SE. Then, you install eolang package: $ npm install eolang Then, you write a simple EO program in hello.eo file in th

Nov 17, 2022

Command line tool to interact with exist-db instances (pre-release)

xst [ĭg-zĭst′] Command line tool to interact with exist-db instances. Built on top of @existdb/node-exist. Installation Until this package is official

Aug 4, 2022

🧘‍♀️ Chamomile simplifies issue and git tracking from the command line.

🧘‍♀️ Chamomile simplifies issue and git tracking from the command line.

Chamomile What is Chamomile? Chamomile simplifies issue and git tracking from the command line. As of now the focus is bridging workflows involving Gr

Aug 4, 2022

A next-gen framework for type-safe command-line applications

Zors 🥇 Next-gen framework for building modern, type-safe command-line applications. 📦 Tiny (zero dependencies) 💡 Runtime agonistic (supports both D

Dec 1, 2022
Comments
  • Failed to download template from github: Cannot read property 'repo' of undefined

    Failed to download template from github: Cannot read property 'repo' of undefined

    Describe the bug

    > create test
    √ Pick a template » Library
    √ Pick a template » TypeScript
    
     ERROR  Failed to download template from github: Cannot read property 'repo' of undefined                                                                                                                                          16:47:47
    
      at /C:/Users/duowe/AppData/Roaming/nvm/v14.19.3/node_modules/@sxzz/create/node_modules/giget/dist/shared/giget.dd19862e.mjs:152:11
      at processTicksAndRejections (internal/process/task_queues.js:95:5)
      at async downloadTemplate (/C:/Users/duowe/AppData/Roaming/nvm/v14.19.3/node_modules/@sxzz/create/node_modules/giget/dist/shared/giget.dd19862e.mjs:151:20)
      at async create (/C:/Users/duowe/AppData/Roaming/nvm/v14.19.3/node_modules/@sxzz/create/dist/chunk-BEWY7M6W.js:114:3)
      at async run (/C:/Users/duowe/AppData/Roaming/nvm/v14.19.3/node_modules/@sxzz/create/dist/chunk-BEWY7M6W.js:38:3)
    
     npx giget@latest [email protected]:sxzz/node-lib-starter.git
    npx: installed 17 in 4.935s
    Error: Failed to download template from registry: request to https://raw.githubusercontent.com/unjs/giget/main/templates/[email protected]:sxzz/node-lib-starter.git.json failed, reason: unable to verify the first certificate
        at file:///C:/Users/duowe/AppData/Roaming/npm-cache/_npx/6520/node_modules/giget/dist/shared/giget.5e7ec864.mjs:158:11
        at processTicksAndRejections (internal/process/task_queues.js:95:5)
        at async downloadTemplate (file:///C:/Users/duowe/AppData/Roaming/npm-cache/_npx/6520/node_modules/giget/dist/shared/giget.5e7ec864.mjs:157:20)
        at async main (file:///C:/Users/duowe/AppData/Roaming/npm-cache/_npx/6520/node_modules/giget/dist/cli.mjs:32:13)
    
     npx giget@latest [email protected]:sxzz/node-lib-starter.git
    npx: installed 17 in 1.938s
    Error: Failed to download template from registry: Failed to download [email protected]:sxzz/node-lib-starter.git template info from https://raw.githubusercontent.com/unjs/giget/main/templates/[email protected]:sxzz/node-lib-starter.git.json: 404 Not Found
        at file:///C:/Users/duowe/AppData/Roaming/npm-cache/_npx/18988/node_modules/giget/dist/shared/giget.5e7ec864.mjs:158:11
        at processTicksAndRejections (internal/process/task_queues.js:95:5)
        at async downloadTemplate (file:///C:/Users/duowe/AppData/Roaming/npm-cache/_npx/18988/node_modules/giget/dist/shared/giget.5e7ec864.mjs:157:20)
        at async main (file:///C:/Users/duowe/AppData/Roaming/npm-cache/_npx/18988/node_modules/giget/dist/cli.mjs:32:13)
    
    // config.ts
    
    import type { Config } from 'C:/Users/duowe/AppData/Roaming/nvm/v14.19.3/node_modules/@sxzz/create/dist/types'
    
    const config: Config = {
      "git": {
        "add": true
      },
      "templates": [
        {
          "name": "Library",
          "color": "green",
          "children": [
            {
              "name": "TypeScript",
              "color": "#3178c6",
              "url": "[email protected]:sxzz/node-lib-starter.git"
            }
          ]
        },
        {
          "name": "Web App",
          "url": "[email protected]:sxzz/node-lib-starter.git",
          "git": {
            "init": false
          }
        }
      ]
    }
    
    export default config
    
    

    Reproduction

    None

    System Info

    System:
        OS: Windows 10 10.0.19044
        CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
        Memory: 4.25 GB / 15.71 GB
      Binaries:
        Node: 14.19.3 - C:\Program Files\nodejs\node.EXE
        Yarn: 1.22.17 - ~\AppData\Roaming\npm\yarn.CMD
        npm: 6.14.17 - C:\Program Files\nodejs\npm.CMD
      Browsers:
        Edge: Spartan (44.19041.1266.0), Chromium (107.0.1418.52)
        Internet Explorer: 11.0.19041.1566
    

    Used Package Manager

    npm

    Validations

    • [X] Follow our Code of Conduct
    • [X] Read the Contributing Guide.
    • [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
    • [X] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
    • [X] The provided reproduction is a minimal reproducible of the bug.
    opened by duowb 1
  • fix: bad config type path on Windows

    fix: bad config type path on Windows

    Description

    On Windows, findConfigTypePath() returns a Windows-style path (use '\\' as directory separator), which is used as-is in TypeScript demo config file.

    This results in importing config type from a bad path on Windows:

    bad-path

    This PR fixes this bug by replacing config type path's all '\\' with '/' when initializing TypeScript demo config file.

    Linked Issues

    Additional context

    opened by mys1024 1
Releases(v0.5.2)
Owner
三咲智子
Student | Entrepreneur | Full Stack Developer | @element-plus @vueuse
三咲智子
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
An Awesome Toggle Menu created with HTML,CSS,JQuery,font-awesome and line by line comment.

Demo : https://blackx-732.github.io/AwesomeMenu/ Under open source license No ©copyright issues Anyone can be modify this code as well Specifically we

BlackX-Lolipop 2 Feb 9, 2021
🎨ansi escape code generator to help make colorful command line tools

ansicodes ?? ansi escape code generator to help make colorful command line tools i got tired of looking up ansi code tables when writing command line

Gabe Banks 53 Dec 17, 2022
enables communication between command-line or desktop applications and browser-based Ethereum wallets such as Metamask.

@securerpc/walletbus @securerpc/walletbus Abstract Quickstart Installation Usage Ethers.js Web3.js Configuration options Logging Development Automated

Manifold Finance 8 Dec 27, 2022
🦄 A command line tool to get tokens on testnets quickly!

?? faucetli A command line tool to get tokens on testnets quickly! Usage Commands Usage $ npm install -g faucetli $ faucetli COMMAND running command..

Kira 60 Jan 1, 2023
A command-line tool to convert Project Zomboid map data into Deep Zoom format

pzmap2dzi pzmap2dzi is a command-line tool running on Windows to convert Project Zomboid map data into Deep Zoom format. Features Supports both python

Min Xiang 14 Dec 31, 2022
Command line tool that automatically migrates tests from protractor to playwright.

Protractor to Playwright migration tool This tool is designed to automatically migrate code from Protractor to Playwright. It is inspired by the "Migr

Amadeus IT Group 9 Nov 20, 2022
Offline rendering examples at the command line with Node.js

Elementary Audio Offline Rendering Examples This repository holds a set of small examples using Elementary in Node.js to process audio files. Each sub

Elementary Audio 8 Jun 12, 2022