hexojs/hexo — pull request #950 by tommy351 (2014-12-09 10:06:12+00:00)
Title: Major refactor

## What's changed

- Replace [async] with [bluebird]. Why?
* [bluebird] is much faster than [async]. ([Benchmark](https://github.com/petkaantonov/bluebird/blob/master/benchmark/stats/latest.md))
* [bluebird] uses fewer memory than [async].
* [bluebird] provides a fluent [Promise] API.

- [Warehouse] is totally rewritten.
* Some APIs were changed. For example:

``` js
// Before
Post.insert({}, function(data){
//
});

// After
Post.insert({}, function(err, data){
//
});
```

* The format of database file was changed. Delete the old files before you using it.

- Use [bunyan] for logging.

- Run tests on [AppVeyor] to make sure Hexo can run properly on Windows also. [![Build status](https://ci.appveyor.com/api/projects/status/hpx3lduqjj2t6uqq?svg=true)](https://ci.appveyor.com/project/tommy351/hexo)

- External plugins/scripts are executed in sandbox.
- Split file system module: [hexo-fs](https://github.com/hexojs/fs)

## Todos

- [ ] Coverage at least 80%. [![Coverage Status](https://coveralls.io/repos/hexojs/hexo/badge.png?branch=feature%2Frewrite)](https://coveralls.io/r/hexojs/hexo?branch=feature%2Frewrite)
- [ ] Add features back.
- [ ] Split server module.

*Some features are not available so far. I'll add they back in the future commits.*

[async]: https://github.com/caolan/async
[bluebird]: https://github.com/petkaantonov/bluebird
[Warehouse]: https://github.com/tommy351/warehouse
[AppVeyor]: http://www.appveyor.com/
[bunyan]: https://github.com/trentm/node-bunyan
[Promise]: https://promisesaplus.com/