add tree.js

Signed-off-by: Liang Li <liang.li@windriver.com>