# project-bulid

> A simple CLI for creating your projects

Latest version **0.0.9** (published 2018-01-02) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install project-bulid
pnpm add project-bulid
yarn add project-bulid
bun add project-bulid
```

Provides the command `build`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.9 |
| Published | 2018-01-02 |
| First published | 2018-01-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 12 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | zhanxiaoning |
| Maintainers | martin_npm |
| Keywords | build, cli, es6 |

## Links

- npm: https://www.npmjs.com/package/project-bulid
- Repository: https://github.com/martin2016hub/project-build
- Homepage: https://github.com/martin2016hub/project-build#readme
- Issues: https://github.com/martin2016hub/project-build/issues
- npm.io page: https://npm.io/package/project-bulid

## Dependencies (12)

- [co](https://npm.io/package/co.md) ^4.6.0
- [chalk](https://npm.io/package/chalk.md) ^1.1.3
- [has-ansi](https://npm.io/package/has-ansi.md)
- [keypress](https://npm.io/package/keypress.md)
- [co-prompt](https://npm.io/package/co-prompt.md) ^1.0.0
- [commander](https://npm.io/package/commander.md) ^2.9.0
- [ansi-regex](https://npm.io/package/ansi-regex.md)
- [strip-ansi](https://npm.io/package/strip-ansi.md)
- [ansi-styles](https://npm.io/package/ansi-styles.md)
- [supports-color](https://npm.io/package/supports-color.md)
- [graceful-readlink](https://npm.io/package/graceful-readlink.md)
- [escape-string-regexp](https://npm.io/package/escape-string-regexp.md)

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 0.0.9 (latest) — 2018-01-02
- 0.0.7 — 2018-01-02

## README

![Build Logo](./logo.jpeg)

# project build
A light tool to generate projects in an easy way.

# Installation
```
npm install project-bulid -g
```
or
```
git clone https://github.com/martin2016hub/project-build.git

cd project-bulid && npm install


npm link (set the environment variables )
```

# Usage
Open your terminal and type `build` or `build -h` , you'll see the help infomation below:
```
  Usage: build <command>


  Commands:

    add|a      Add a new template
    list|l     List all the templates
    init|i     Generate a new project
    delete|d   Delete a template

  Options:

    -h, --help     output usage information
    -V, --version  output the version number
```

# Commands
### add | a
This command would help you to add a new template to the `templates.json`, which will be used by Build to generate projects.
```
$ build add
```
```
 /*  your template's name */
Template name: my-tpl

 /* your template's git https link, note that it ends with .git */
Git https link:  https://gitxxx/somebody/my-tpl.git 

 /* your template's branch */
Branch: master 
```
Once confirm you'll see the message like below:
```
The last template list is:

{ tpl:
   { 'my-tpl-name':
      { url: 'https://gitxxx/somebody/my-tpl.git',
        branch: 'master' } } }
```
Now you've added a new template to build successfully.

### list | l
It shows you the templates list.
```
$ build list

{ tpl:
   { 'my-tpl-name':
      { url: 'https://gitxxx/somebody/my-tpl.git',
        branch: 'master' } } }
```

### init | i
After adding new templates, you could use this command to generate your own project by choosing template.
```
$ build init

/* enter a template name which was added by yourself */
Template name: my-tpl-name

/* your project name */
Project name: my-new-project
```
After enter correct template name and confirm, you'll see the message below:
```
Start generating...

 √ Generation completed!

 cd my-new-project && npm install
```
It's easy, right?

### delete | d
To delete a template, you could use this command:
```
$ build delete
```
and type the template name you want to delete:
```
Template name: my-tpl-name
```
if the name exist, you will see:
```
Template deleted!
The last template list is:

{ tpl:
   { 'my-tpl-name': undefined } }
```
once a template is `undefined`, it means you've deleted it successfully.

# Template
The most important part of project-build is `template`. All templates' infomation were list in the `templates.json`.
A template means a project sample, which has a simple or complex file structure.

You can create your own templates repository, and push your templates in different branches. All you need to do then is to add the templates into Build 's `templates.json`.

# License
MIT.

---
_Source: https://npm.io/package/project-bulid · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
