Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
onevcat committed Mar 27, 2017
1 parent 3c942a0 commit b98fd91
Showing 1 changed file with 42 additions and 5 deletions.
47 changes: 42 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
# FengNiao
![](https://raw.githubusercontent.com/onevcat/FengNiao/assets/logo.png)

</p>

<p align="center">
<a href="https://travis-ci.org/onevcat/FengNiao"><img src="https://img.shields.io/travis/onevcat/FengNiao/master.svg"></a>
<a href="https://swift.org/package-manager/"><img src="https://img.shields.io/badge/swift-3.0-brightgreen.svg"/></a>
<a href="https://swift.org/package-manager/"><img src="https://img.shields.io/badge/SPM-ready-orange.svg"></a>
<a href="https://raw.githubusercontent.com/onevcat/Kingfisher/master/LICENSE"><img src="https://img.shields.io/cocoapods/l/Kingfisher.svg?style=flat"></a>
<a href="https://swift.org/package-manager/"><img src="https://img.shields.io/badge/platform-macos%20|%20Linux-blue.svg"/></a>
<a href="https://codecov.io/gh/onevcat/Hedwig"><img src="https://codecov.io/gh/onevcat/Hedwig/branch/master/graph/badge.svg"/></a>
</p>

## What

Expand Down Expand Up @@ -28,15 +39,15 @@ You may want to install in from Homebrew. But for now it is not supported.

Just navigate to your project folder, then:

```bash
```shell
> fengniao
```

It will scan current folder and all its subfolders to find unused images, then ask for you whether you want to delete them. Please make sure you have a backup or a version control system before you deleting the images, it will be an un-restorable operation.

FengNiao supports some arguments, you could find it by:

```bash
```shell
> fengniao --help

-p, --project:
Expand All @@ -53,6 +64,14 @@ FengNiao supports some arguments, you could find it by:
Prints this help message.
```

A more daily-work usage under a project could be:

```shell
> fengniao --project . --exclude Carthage Pods
```

This will search in current folder, as well as skip the `Carthage` and `Pods` folder.

### Use with Xcode build phase

It is easy to integrate FengNiao into your Xcode build process. By doing so, you could ensure your project being cleaned every time you build your project.
Expand All @@ -63,12 +82,30 @@ Add a "Run Script" phase in the Build Phases tab:

Then drap it above of "Copy Bundle Resources", editing its content to something like this:

```
fengniao --exclude Carthage vendor --force
```bash
fengniao --exclude Carthage --force
```

It is recommended to exclude vender's folders like Pods or Carthage. Since you do not have a chance to confirm the result, you also need to add `--force` option.

## License and Information

FengNiao is open-sourced as MIT license. The name of this project comes from the Chinese word 蜂鸟 (hummingbird), which is the smallest bird in the world.

Submit [an issue](https://github.com/onevcat/Hedwig/issues/new) if you find something wrong. Pull requests are warmly welcome, but I suggest to discuss first.

You can also follow and contact me on [Twitter](http://twitter.com/onevcat) or [Sina Weibo](http://weibo.com/onevcat).

## Learning to Create

I streamed the way I created this tool as a live-coding session in a live platform in China. You can learn how to create a project with Swift Package Manager, how to apply Protocol-Oriented Programming (POP) in the project, and how to develop in a BDD way as well as write good tests there.

It is a paid series lesson in Chinese. If you are interested in it, please check and watch the links below:

#### 现场编程 - 用 Swift 创建命令行工具 fengniao-cli

- [Part 1](http://m.quzhiboapp.com/?liveId=391&fromUserId=12049)
- [Part 2](http://m.quzhiboapp.com/?liveId=401&fromUserId=12049)
- [Part 3](http://m.quzhiboapp.com/?liveId=409&fromUserId=12049)


0 comments on commit b98fd91

Please sign in to comment.