1.2.0 • Published 3 years ago

@ando_ghevian/create-project v1.2.0

Weekly downloads
19
License
ISC
Repository
github
Last release
3 years ago

CreateProject

This is simple CLI Tool to create projects from Templates scoped to specific user or organsization.

Usage

There is two ways to use create-project: 1. By Installing it globaly 2. Via npx

Global Install

Steps for first case(global install) 1. First lets install it globaly, npm i -g @ando_ghevian/create-project 2. Set scope from which you want to download templates (Templates start with cpj-template-templatename), create-project scope set @ando_ghevian 3. Check that everything went smoothly, and scope is accepted create-project scope get 4. Create Project From: create-project --template npm-package my-package

You can also use another scope when creating project:

  • create-project scope use @elseScope --template temp prj
  • create-project use @elseScope --template temp prj (use is alias for scope use)

You can create project when setting scope:

  • create-project scope set @ando_ghevan -t npm-package my-package

You can also use templates from url, and in this case you dont need any scope to be set.

  • create-project -t git+https://git@github.com:AndoGhevian/cpj-template-npm-package.git proj

    WORNING: Be shore that you specify protocol!!!

You can just test your local Templates:

  • create-project -t file:../../MyTemplate prj
  • create-project -t file:/path/from/root/to/template prj

    NOTE: See below "How to create Templates"

NPX

Steps For npx:

  • npx @ando_ghevian/create-project use @Scope --template tmp prj
  • npx @ando_ghevian/create-project -t git+https://git@github.com:AndoGhevian/cpj-template-npm-package.git proj

How to create Templates

It's similar to create-react-app Custom Templates. Just few differences: 1. Templates from npm registry must be scoped to organization or user and fit the format cpj-template-templatename, where cpj-template will be used as default if --template(-t) is specified without value (Or not specified). 1. You can Use Templates also from Code Hosting Platforms like github and gitlab. In this case scope is not needed. And Template Name can be anything, i.e. no need to start with cpj-template. Template just HAS TO stick to the rules, that we have defined. 1. Default Key/Value Pairs of created projects package.json file, come from npm init -y command, and anything you specify in template.json in /package property, will replace default ones. 1. You MUST NOT specify package.json, package-lock.json and node_modules/ in template folder (/template). They will be simply ignored. 1. And Currently We will replace all {{ProjectName}} occurrences in README.md with your project name.

1.2.0

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago