category : javascript

wechat not support promise on android

wechat not support promise on android wechat not support promise in low version android , but some IOS system can do it . if you debug get nothing, but the program run not correct, you can care abo

setup eslint with es6 in sublime text

setup eslint with es6 in sublime textget started with eslint12345npm install eslint -g # or npm install eslint npm install babel-eslint -g you can install it either globally or locally. configurecrea

node version managers

node version managersn1sudo npm install -g n install 1sudo n stable install spacify version 1sudo n 0.12.7 siwtch version 1n remove some version 1n rm 0.12.7 install latest version1n latest use speci

gulp plugins

Glup简介常用插件及介绍gulp-live-servergulp-live-server可以配合chrome插件liveReload使用,其功能是在写前端功能的时候可以自动刷新的页面,与当前保持的代码同步。 useage: 123456789101112131415161718192021var gulp = require('gulp');var gls = require('gulp-li

Complied nodejs in ubuntu

在ubuntu中配置node环境下载123wget https://nodejs.org/dist/v0.12.7/node-v0.12.7.tar.gztar -zxvf node-v0.12.7.tar.gzcd node-v0.12.7 编译123./configuremakesudo make install 测试12node -vnpm -v 当前版本 npm是直接集成在node源文件

在报错时,让gulp监视仍继续的方法

在运行glup任务时,如果使用watch进行task,如果task没有做错误处理,gulp进程会直接崩溃掉,如果我们想出错扔继续监听怎么办?有时候我们需求以下场景:实时的编译jade模板,编写jade模板时实时的进行编译输出,偶尔语法错误,这时gulp就崩溃了,又要重新运行watch? 是不是很烦? 原理:gulp官方推荐在编写的插件中在发生错误时抛出一个gulp-util的错误,这个错误会出现