# generator-codepolio [![Build Status](https://secure.travis-ci.org/miconblog/generator-codepolio.png?branch=master)](https://travis-ci.org/miconblog/generator-codepolio) [![Dependency Status](https://david-dm.org/miconblog/generator-codepolio.svg)](https://david-dm.org/miconblog/generator-codepolio) [![devDependency Status](https://david-dm.org/miconblog/generator-codepolio/dev-status.svg)](https://david-dm.org/miconblog/generator-codepolio#info=devDependencies) [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/miconblog/generator-codepolio/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

> [Yeoman](http://yeoman.io) generator

# Codepolio Yeoman Generator
To make your **portfolio site** with your code repositories like github and bitbucket, you need an 'code.jam' (JSON format) file. So you have to push an jam file to your repository first. If you don't want to show your project in your site, just forget it. Only the repository had an jam file will be generated by **Codepolio**.

## Dependencies
[Yeoman](http://yeoman.io), [Gulp](http://gulpjs.com/), [Bower](http://bower.io/)

## code.jam Example
```
{ 
  "title": "codepolio",
  "description": "Make your portfolio site with your repositories. supported Github, Bitbucket, TeamForge and so on. also you can select a theme and customize it yourself.",
  "category" : "Yeoman Generator",
  "demo_link": "http://miconblog.github.io"
}
```

# How to install

install from npm (stable)
```bash
$> npm install -g generator-codepolio
```

install from source code for development (unstable)
```bash
$> git clone https://github.com/miconblog/generator-codepolio.git
$> cd generator-codepolio
$> npm install
$> npm link
```

finally, initiate the generator:
```bash
$> mkdir yoursite
$> cd yoursite
$ yoursite> yo codepolio
```

# How to build & run 
First of all, you have to make **sweet code jam**
```bash
$ yoursite/> gulp codejam
```

serve to local as development mode
```bash
$ yoursite/> gulp serve
```

serve to local as production mode
```bash
$ yoursite/> gulp serve:dist
```

build for deploy yourself
```bash
$ yoursite/> gulp build
```

# How to deploy to github pages
First, open your **.yo-rc.json** file and modify deploy infomation. if you mind to expose your github password, you can use a [personal access token](https://github.com/settings/applications).

```
{
  "generator-codepolio": {
    "deploy": {
      "username": "GITHUB_USERNAME",
      "password": "GITHUB_PASSWORD",
      "repository": "codepolio",
      "token": "GITHUB_TOKEN"
    },
    ....
  }
}
```

Second, run **deploy** script:
**repository should be created in github**
```bash
$ yoursite/> sh deploy.sh init
```
**after created then just push it**
```bash
$ youtsite/> sh deploy.sh push
or 
$ youtsite/> sh deploy.sh push 'with commit log'
```


# References
[How to debug yeoman generator](http://techblog.dorogin.com/2014/04/how-to-debug-yeoman-generator.html)

## License

MIT

