From 1e5121274f64ff20b6e4b4f41990c40f7bd828b8 Mon Sep 17 00:00:00 2001 From: "Zhuohuan LI (CARPE DIEM)" Date: Sat, 3 Dec 2016 11:16:45 +0800 Subject: [PATCH] better log --- README.md | 8 +++++--- test/puppet-web/puppet-web.spec.ts | 2 +- test/puppet-web/watchdog.spec.ts | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 54c92e4e..3a445501 100644 --- a/README.md +++ b/README.md @@ -58,11 +58,13 @@ We have two options to run wechaty: [![Docker Pulls](https://img.shields.io/docker/pulls/zixia/wechaty.svg?maxAge=2592000)](https://hub.docker.com/r/zixia/wechaty/) [![Docker Stars](https://img.shields.io/docker/stars/zixia/wechaty.svg?maxAge=2592000)](https://hub.docker.com/r/zixia/wechaty/) [![Docker Layers](https://images.microbadger.com/badges/image/zixia/wechaty.svg)](https://microbadger.com/#/images/zixia/wechaty) +The **best practice** to use Wechaty is run by docker, becasue it's not only the most easy way to get start, but also protect you out of the troubles of dependencies problems. + ```shell $ docker run -ti --rm --volume="$(pwd)":/bot zixia/wechaty mybot.js ``` -* Wechaty Docker has native support for TypeScript as well: just write in TypeScript and save to `mybot.ts`. +> Wechaty Docker support to run TypeScript directly as well: just write in TypeScript and save to `mybot.ts`. Get to know more about Wechaty Docker at [Wiki:Docker](https://github.com/wechaty/wechaty/wiki/Docker). @@ -70,14 +72,14 @@ Get to know more about Wechaty Docker at [Wiki:Docker](https://github.com/wechat [![NPM Version](https://badge.fury.io/js/wechaty.svg)](https://badge.fury.io/js/wechaty) [![Downloads][downloads-image]][downloads-url] +Using Wechaty from NPM is **NOT recommended**. Please use Docker(above) instead unless you are ready to deal with lots of unknown problems. + ```shell $ npm install --save wechaty $ node mybot.js ``` -You might be asked for install the `chromedriver`, depends on which platform you are. - Get to know more about NPM at [Wiki:NPM](https://github.com/wechaty/wechaty/wiki/NPM) # API Reference diff --git a/test/puppet-web/puppet-web.spec.ts b/test/puppet-web/puppet-web.spec.ts index 4228e234..d9bbed30 100644 --- a/test/puppet-web/puppet-web.spec.ts +++ b/test/puppet-web/puppet-web.spec.ts @@ -18,7 +18,7 @@ import { Server } from '../../src/puppet-web/server' // import { spy } from 'sinon' process.on('unhandledRejection', (reason, p) => { - console.log('!!!!!!!') + console.log('!!!!!!! unhandledRejection in puppet-web.spec.ts') console.log('Unhandled Rejection at: Promise', p, 'reason:', reason) console.log('!!!!!!!') }) diff --git a/test/puppet-web/watchdog.spec.ts b/test/puppet-web/watchdog.spec.ts index 56aa3caa..165352f5 100644 --- a/test/puppet-web/watchdog.spec.ts +++ b/test/puppet-web/watchdog.spec.ts @@ -21,7 +21,7 @@ import { const PROFILE = 'unit-test-session.wechaty.json' process.on('unhandledRejection', (reason, p) => { - console.log('!!!!!!!') + console.log('!!!!!!! unhandledRejection in watchdog.spec.ts') console.log('Unhandled Rejection at: Promise', p, 'reason:', reason) console.log('!!!!!!!') }) -- GitLab