- fis-conf.js
- version
- name
- index.js
- express
- package.json
- views
- index.html
- index.js(uri, inline)
- index.css(inline, livereload)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var spawn = require('child_process').spawn; | |
var chalk = require('chalk'); | |
function format(data){ | |
var lost, rtt; | |
data.replace(/([\d.]+%) packet loss| = ([\d.]+)\/([\d.]+)\/([\d.]+)\/([\d.]+) ms/g, function(m, $1, $2, $3, $4, $5){ | |
if($1){ | |
lost = $1; | |
} else if($3) { | |
rtt = $3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var I0 = void 0 | |
, C0 = !0 | |
, D0 = null | |
, A0 = !1 | |
, x0 = encodeURIComponent | |
, w0 = window | |
, t0 = document | |
, B0 = Math | |
, s1 = navigator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(N, IA, JA, $, KA, hl, Dj, LA, Ej, MA, m, Sa, il, NA, Fj, vs, OA, PA, QA, RA, I, SA, TA, UA, va, VA, jl, WA, ff, XA, Ng, kl, YA, ZA, $A, aB, ws, xs, bB, ys, cB, dB, U, eB, Mo, fB, Kc, gB, zs, Lc, hB, ll, hd, iB, jB, id, kB, No, Wb, P, zd, lB, r, mB, As, Bs, Cs, Ds, Es, Aa, Mc, nB, R, yc, Nc, oB, Yh, pB, ml, qB, Gj, Hf, Fs, nl, Oa, Oo, If, Zh, Po, Gs, rB, sB, tB, uB, Eb, vB, Hs, Og, Is, wB, Qo, ol, pl, ql, xB, T, Hj, Jf, Pg, $h, yB, zB, V, Kf, Ij, Qg, Ro, AB, Js, BB, Lf, Ks, Mf, rl, CB, Rg, sl, DB, EB, FB, ue, Da, bc, tl, Fb, ul, Ls, Ms, lc, GB, ve, Ns, mc, Os, Ps, Qs, gf, ai, So, Ad, jd, Rs, Oc, HB, Nf, Ga, IB, Of, Ss, Ts, Us, JB, Ib, nc, Ab, KB, Vs, | |
Pc, Qc, Rc, we, bi, tb, vl, Ws, Xs, LB, Pf, MB, ha, To, Uo, Bd, NB, wl, OB, q, Ys, Zs, Vo, $s, xl, ci, at, Wo, bt, ct, di, Bb, dt, et, ft, gt, xe, Sg, Cd, yl, ye, Xo, ei, ht, Qf, Pb, Yo, Zo, cb, Tg, it, fi, Jj, zl, Al, Bl, Pa, Rf, Cl, Sf, $o, PB, Dl, wb, jt, gi, El, kt, Fl, Sc, cc, Tf, Gl, Dd, QB, ap, bp, Kj, ba, ub, lt, mt, nt, ot, pt, Hl, qt, Lj, E |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>hello world</title> | |
<script type="text/javascript"> | |
//这里是防御用js,写在页面的最开始 | |
//在这个js之后执行的任何addEventListener方法都将被监控 | |
(function(){ | |
var raw_fn = Element.prototype.addEventListener; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************* | |
* 实际使用展示,用户配置文件 fis-conf.js | |
*******************************************/ | |
//后缀映射 | |
fis.config.merge({ | |
roadmap : { | |
ext : { | |
coffee : 'js', | |
less : 'css', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*==========[ 构建工具核心逻辑 ]==========*/ | |
//默认配置 | |
var defaultConfig = { | |
plugins : [ 'parse', 'optimize', 'lint', 'test' ] | |
}; | |
var sys = { | |
find : function(){/*查找所有项目文件*/}, | |
get : function(key){/*获取配置*/}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.baidu.fis; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.InputStreamReader; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.Map; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo | |
set -e | |
trap 'echo Error on line $BASH_SOURCE:$LINENO' ERR | |
trap 'rm -f $tmp' EXIT | |
if [ -z $2 ] | |
then |