npm package: @geekcojp/gp
Description: A cli tool that to start project smoothly
Author: nju33
Latest version: 0.3.0

# geek-project

[![npm: @geekcojp/gp](https://img.shields.io/npm/v/@geekcojp/gp.svg)](https://www.npmjs.com/package/@geekcojp/gp)
[![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest)
[![CircleCI](https://circleci.com/gh/geekcojp/gp/tree/master.svg?style=svg&circle-token=c4e7c826107ebab3ee313c62f2cca3030d9a3610)](https://circleci.com/gh/geekcojp/gp/tree/master)
[![Coverage Status](https://coveralls.io/repos/github/geekcojp/gp/badge.svg?branch=master)](https://coveralls.io/github/geekcojp/gp?branch=master)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
![license: mit](https://img.shields.io/packagist/l/doctrine/orm.svg)

## Usage

### Install

```bash
npm i @geekcojp/gp
# npm i @geekcojp/gp@next
```

### Flow

#### 1 Create project directory

```bash
mkdir <project-dirname> && cd <project-dirname>
```

#### 2 Initialize by `yarn`

```bash
yarn init -y
```

#### 3 Initialize by `gp`

```bash
gp init
# with webpack
gp init --webpack
```

#### 4 Add template


```bash
gp add pug
gp add sass
gp add postcss
gp add typescript (--module) (--react) (--firebase)
gp add babel
```

for example,

##### Webpack + Sass + PostCSS + TypeScript + React

```bash
gp init --webpack && gp add sass && gp add postcss && gp add typescript --react
gp dev
```

##### Pug + Sass + PostCSS + Babel

```bash
gp init && gp add pug && gp add sass && gp add postcss && gp add babel
gp dev
```

#### 5 develop

```bash
gp dev
```

#### 6 build

```bash
gp build
```

### Commands

#### Top level

```bash
$ gp --help

gp [command]

Commands:
  gp init    Initialize
  gp add     Add a template into the project
  gp remove  Remove a template from the project
  gp dev     Develop
  gp build   Build for production

Options:
  --version  Show version number                                       [boolean]
  --help     Show help                                                 [boolean]
```

#### Add

```bash
$ gp add --help

gp add

Add the tool into this project

Commands:
  gp add typescript  Add typescript environment
  gp add babel       Add Babel into the project
  gp add sass        Add sass environment
  gp add postcss     Add postcss environment
  gp add pug         Add postcss environment

Options:
  --version  Show version number                                       [boolean]
  --help     Show help                                                 [boolean]
```

### Supports

- [x] pug
- [x] sass
- [x] postcss
- [x] sass + postcss
- [ ] less
- [ ] less + postcss
- [ ] stylus
- [ ] stylus + postcss
- [x] flow
- [x] typescript
- [x] jQuery (vanilla)
- [x] CircleCI

### TODO

- [ ] test this project
- [ ] pug (with webpack)
- [x] pug (without webpack)
- [x] sass (with webpack)
- [x] sass (without webpack)
- [x] postcss (with webpack)
- [ ] postcss (without webpack)
- [x] flow (with webpack)
- [x] flow (without webpack)
- [x] typescript (with webpack)
- [x] typescript (with react)
- [ ] typescript (with react-router)
- [x] typescript (with jest)
- [x] typescript (with enzyme)
- [ ] typescript (with ssr)
- [ ] typescript (with e2e)
- [ ] typescript (without webpack)
- [x] circleci