{"_id":"edpx-zhixin","_rev":"28-d8f94d559a23a992852899f42f2564e0","name":"edpx-zhixin","description":"edp zhixin package","dist-tags":{"latest":"1.0.1"},"versions":{"0.1.0":{"name":"edpx-zhixin","version":"0.1.0","description":"edp zhixin package","scripts":{"test":"make -C test"},"dependencies":{"edp-core":"~1.0.4","edp-config":"~1.0.0","edp-webserver":"~1.0.10","edp-watch":"~0.1.3","shelljs":"~0.2.6","wrench":"~1.5.8","glob":"~3.2.9","uglify-js":"~2.3.0","less":"~1.4.2","uglifycss":"~0.0.5","path-to-regexp":"~0.0.2"},"repository":{"type":"git","url":"git://github.com/ecomfe/edpx-zhixin.git"},"bugs":{"url":"https://github.com/ecomfe/edpx-zhixin/issues"},"contributors":[{"name":"sekiyika","email":"px.pengxing@gmail.com"}],"author":"","license":"ISC","devDependencies":{"jasmine-node":"^1.14.2"},"homepage":"https://github.com/ecomfe/edpx-zhixin","_id":"edpx-zhixin@0.1.0","dist":{"shasum":"45aec4d6eb401a6462a5a766e6e5760f980eefe1","tarball":"https://registry.npmjs.org/edpx-zhixin/-/edpx-zhixin-0.1.0.tgz","integrity":"sha512-mbXS5m7vpO0ATHaI+mm6Z0n1eGILLR7LVnUn9ndpec+eSlFnon3/LMPDUugcs8WcgjWCSeEg8p6PFcxvmuyc7Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGGZfPEJKMqfiuo/PbWHxN9T7N8xCS/An6OKhe8w6KBNAiEAoI3yop+MeVKuDOewZ2NJepqevCI6C8jv7eIkkl1UDow="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"sekiyika","email":"pengxing5501854@gmail.com"},"maintainers":[{"name":"sekiyika","email":"pengxing5501854@gmail.com"}]},"0.1.1":{"name":"edpx-zhixin","version":"0.1.1","description":"edp zhixin package","scripts":{"test":"make -C test"},"dependencies":{"edp-core":"~1.0.4","edp-config":"~1.0.0","edp-webserver":"~1.0.10","edp-watch":"~0.1.3","shelljs":"~0.2.6","wrench":"~1.5.8","glob":"~3.2.9","uglify-js":"~2.3.0","less":"~1.4.2","uglifycss":"~0.0.5","path-to-regexp":"~0.0.2"},"repository":{"type":"git","url":"git://github.com/ecomfe/edpx-zhixin.git"},"bugs":{"url":"https://github.com/ecomfe/edpx-zhixin/issues"},"contributors":[{"name":"sekiyika","email":"px.pengxing@gmail.com"}],"author":"","license":"ISC","devDependencies":{"jasmine-node":"^1.14.2"},"homepage":"https://github.com/ecomfe/edpx-zhixin","_id":"edpx-zhixin@0.1.1","dist":{"shasum":"0ba44b507715fbd367d06849c0eb3b81c74e3b72","tarball":"https://registry.npmjs.org/edpx-zhixin/-/edpx-zhixin-0.1.1.tgz","integrity":"sha512-zzMg0a5o5HhG1KgGvNz//sIk2xa65MdQc01+iwE2yuAN2KvvsCqp6MoW48mnQOHwoVBjkV6KGOGpDlAGPLUiTg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICmBQo9bFRk9wAbAEbGou0z6o8gNH+WOmTGYwNhsR70tAiBAw9wHej3kwtyHqc+zUVlC1T4GFqKYE0h7rQ9JRTO4Uw=="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"sekiyika","email":"pengxing5501854@gmail.com"},"maintainers":[{"name":"sekiyika","email":"pengxing5501854@gmail.com"}]},"0.1.2":{"name":"edpx-zhixin","version":"0.1.2","description":"edp zhixin package","scripts":{"test":"make -C test"},"dependencies":{"edp-core":"~1.0.4","edp-config":"~1.0.0","edp-webserver":"~1.0.10","edp-watch":"~0.1.3","shelljs":"~0.2.6","wrench":"~1.5.8","glob":"~3.2.9","uglify-js":"~2.3.0","less":"~1.4.2","uglifycss":"~0.0.5","path-to-regexp":"~0.0.2"},"repository":{"type":"git","url":"git://github.com/ecomfe/edpx-zhixin.git"},"bugs":{"url":"https://github.com/ecomfe/edpx-zhixin/issues"},"contributors":[{"name":"sekiyika","email":"px.pengxing@gmail.com"}],"author":"","license":"ISC","devDependencies":{"jasmine-node":"^1.14.2"},"homepage":"https://github.com/ecomfe/edpx-zhixin","_id":"edpx-zhixin@0.1.2","dist":{"shasum":"da03e1ce3739d64556dd88678c7dd41ce56ba292","tarball":"https://registry.npmjs.org/edpx-zhixin/-/edpx-zhixin-0.1.2.tgz","integrity":"sha512-v2LLFAvGdva1Tp9iCRVlG6GYvhshr5kHejcN5gXO2Q84HSYZrHdGVV+DyrKq8lp5PHMBSlK2tSlBKNHr3BX3cQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGyWDczV/tssgX7MB9B9+JSXX45eZmkVZW2qhbRafLx/AiAt0rJjZb7Zf545jJXHC3X0zGZYdarOJdE0Q1kHm+Mk2g=="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"sekiyika","email":"pengxing5501854@gmail.com"},"maintainers":[{"name":"sekiyika","email":"pengxing5501854@gmail.com"}]},"0.1.3":{"name":"edpx-zhixin","version":"0.1.3","description":"edp zhixin package","scripts":{"test":"make -C test"},"dependencies":{"edp-core":"~1.0.4","edp-config":"~1.0.0","edp-webserver":"~1.0.10","edp-watch":"~0.1.3","shelljs":"~0.3.0","wrench":"~1.5.8","glob":"~4.0.0","uglify-js":"~2.4.13","less":"~1.7.0","uglifycss":"~0.0.5","path-to-regexp":"~0.1.2"},"repository":{"type":"git","url":"git://github.com/ecomfe/edpx-zhixin.git"},"bugs":{"url":"https://github.com/ecomfe/edpx-zhixin/issues"},"contributors":[{"name":"sekiyika","email":"px.pengxing@gmail.com"}],"author":"","license":"ISC","devDependencies":{"jasmine-node":"^1.14.2"},"homepage":"https://github.com/ecomfe/edpx-zhixin","_id":"edpx-zhixin@0.1.3","dist":{"shasum":"1e1d5649bad5141ac0cd47e985e57bd9bce6c7cb","tarball":"https://registry.npmjs.org/edpx-zhixin/-/edpx-zhixin-0.1.3.tgz","integrity":"sha512-97PpE0Lj8rVnvT8cH+z/6vUJQ3Nbx2NNJk+Ffgf+3vGJE8hZWCSKRTPqFlpdaAkBtMz8Kh6UV1Sn/vxXh3klDg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnJXm4/L2XgispgUJxxFuZRuHGfhbZzrzft8AKokZJVQIgJMpjxJfxhWPctvHBARI6aAEAosqzRNkfobXm1Fbgp+Q="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"sekiyika","email":"pengxing5501854@gmail.com"},"maintainers":[{"name":"sekiyika","email":"pengxing5501854@gmail.com"}]},"0.1.4":{"name":"edpx-zhixin","version":"0.1.4","description":"edp zhixin package","scripts":{"test":"make -C test"},"dependencies":{"edp-core":"~1.0.4","edp-config":"~1.0.0","edp-webserver":"~1.0.10","edp-watch":"~0.1.3","shelljs":"~0.3.0","wrench":"~1.5.8","glob":"~4.0.0","uglify-js":"~2.4.13","less":"~1.7.0","uglifycss":"~0.0.5","path-to-regexp":"~0.1.2"},"repository":{"type":"git","url":"git://github.com/ecomfe/edpx-zhixin.git"},"bugs":{"url":"https://github.com/ecomfe/edpx-zhixin/issues"},"contributors":[{"name":"sekiyika","email":"px.pengxing@gmail.com"}],"author":"","license":"ISC","devDependencies":{"jasmine-node":"^1.14.2"},"homepage":"https://github.com/ecomfe/edpx-zhixin","_id":"edpx-zhixin@0.1.4","dist":{"shasum":"200dd7092925980cd3d127da433aa1dd67bf5c3c","tarball":"https://registry.npmjs.org/edpx-zhixin/-/edpx-zhixin-0.1.4.tgz","integrity":"sha512-ibtyJ6B6cHd4Zyo2+dGn8tvoKyNGz/zKqlStG4W/nwHhQCbrDWCfiHVz4K30mc/4lQF+TQ2P4721k01eEHJebw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA2kswdipUz6xIbaiYUvlaszMeyHUVGt1mgXRAgM3EbBAiEA5k56DG0CfkdCFoWtYiuU9eyl9DvUMP3Q88PVo5O1aFk="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"sekiyika","email":"pengxing5501854@gmail.com"},"maintainers":[{"name":"sekiyika","email":"pengxing5501854@gmail.com"}]},"0.1.5":{"name":"edpx-zhixin","version":"0.1.5","description":"edp zhixin package","scripts":{"test":"make -C test"},"dependencies":{"edp-core":"~1.0.4","edp-config":"~1.0.0","edp-webserver":"~1.0.10","edp-watch":"~0.1.3","shelljs":"~0.3.0","wrench":"~1.5.8","glob":"~4.0.0","uglify-js":"~2.4.13","less":"~1.7.0","uglifycss":"~0.0.5","path-to-regexp":"~0.1.2"},"repository":{"type":"git","url":"git://github.com/ecomfe/edpx-zhixin.git"},"bugs":{"url":"https://github.com/ecomfe/edpx-zhixin/issues"},"contributors":[{"name":"sekiyika","email":"px.pengxing@gmail.com"}],"author":"","license":"ISC","devDependencies":{"jasmine-node":"^1.14.2"},"homepage":"https://github.com/ecomfe/edpx-zhixin","_id":"edpx-zhixin@0.1.5","dist":{"shasum":"3ea6872d0eee515095b754906ce08147ddd714f3","tarball":"https://registry.npmjs.org/edpx-zhixin/-/edpx-zhixin-0.1.5.tgz","integrity":"sha512-Y+olD6EIS51Y326n6WscocaZexlGmck/lpgWHEHTdFnMBtGHXs6GcLVk9BaifoaCg/O4oFY6gocDX+SoJiq/6A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGkdFRQlIL8GWaA01amWkwE1IzO710PvxgOgic0NB5MPAiBriCdgoJW/VuwrgMPJ5VQtnxbeXIYZeZKwGNMJNv1hwA=="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"sekiyika","email":"pengxing5501854@gmail.com"},"maintainers":[{"name":"sekiyika","email":"pengxing5501854@gmail.com"}]},"0.1.6":{"name":"edpx-zhixin","version":"0.1.6","description":"edp zhixin package","scripts":{"test":"make -C test"},"dependencies":{"edp-core":"~1.0.4","edp-config":"~1.0.0","edp-webserver":"~1.0.10","edp-watch":"~0.1.3","shelljs":"~0.3.0","wrench":"~1.5.8","glob":"~4.0.0","uglify-js":"~2.4.13","less":"~1.7.0","uglifycss":"~0.0.5","path-to-regexp":"~0.1.2"},"repository":{"type":"git","url":"git://github.com/ecomfe/edpx-zhixin.git"},"bugs":{"url":"https://github.com/ecomfe/edpx-zhixin/issues"},"contributors":[{"name":"sekiyika","email":"px.pengxing@gmail.com"}],"author":"","license":"ISC","devDependencies":{"jasmine-node":"^1.14.2"},"homepage":"https://github.com/ecomfe/edpx-zhixin","_id":"edpx-zhixin@0.1.6","dist":{"shasum":"df12d705b6403685723afa5d7eeff7c03d35e554","tarball":"https://registry.npmjs.org/edpx-zhixin/-/edpx-zhixin-0.1.6.tgz","integrity":"sha512-GUWY0O8AeXYRqQPO+FEXDOv3DAGZhzz+bPjFmqz/+CXL1IFh3LRfrWBu5wezg1EI9fAUSxMGZeycJ43f3OWXkw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCy0DmVbl2plEBW6MNWqSXqrU6rsEBxOQTzgVmh5XRfPgIgToxpGDdIHOuejEqmCHj5ET4pNawcFM6kD/pVaFqwEXA="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"sekiyika","email":"pengxing5501854@gmail.com"},"maintainers":[{"name":"sekiyika","email":"pengxing5501854@gmail.com"}]},"0.1.7":{"name":"edpx-zhixin","version":"0.1.7","description":"edp zhixin package","scripts":{"test":"make -C test"},"dependencies":{"edp-core":"~1.0.4","edp-config":"~1.0.0","edp-webserver":"~1.0.10","edp-watch":"~0.1.3","shelljs":"~0.3.0","wrench":"~1.5.8","glob":"~4.0.0","uglify-js":"~2.4.13","less":"~1.7.0","uglifycss":"~0.0.5","path-to-regexp":"~0.1.2"},"repository":{"type":"git","url":"git://github.com/ecomfe/edpx-zhixin.git"},"bugs":{"url":"https://github.com/ecomfe/edpx-zhixin/issues"},"contributors":[{"name":"sekiyika","email":"px.pengxing@gmail.com"}],"author":"","license":"ISC","devDependencies":{"jasmine-node":"^1.14.2"},"homepage":"https://github.com/ecomfe/edpx-zhixin","_id":"edpx-zhixin@0.1.7","dist":{"shasum":"ae17a861a825a3bf2d98efe1e4e38566ebd7a1a1","tarball":"https://registry.npmjs.org/edpx-zhixin/-/edpx-zhixin-0.1.7.tgz","integrity":"sha512-hBAFVCE2zgXym3/rDAJxzr2rdv2sPNuH3COhLU54dZV21SeK1ah5A/AIDW+xQc/G7lG9s2hiNHmfZn6NT8+LUg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9EwRjPdEyFs/uTCY4YWmXBJkpdQSZcZtMbGfAv0m5ggIgKnWppS4AkTmAqIXkR+/KgZqfiRF5v0IYlwjtHhMyutY="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"sekiyika","email":"pengxing5501854@gmail.com"},"maintainers":[{"name":"sekiyika","email":"pengxing5501854@gmail.com"}]},"0.1.8":{"name":"edpx-zhixin","version":"0.1.8","description":"edp zhixin package","scripts":{"test":"make -C test"},"dependencies":{"edp-core":"~1.0.4","edp-config":"~1.0.0","edp-webserver":"1.0.17-beta.3","edp-watch":"~0.1.3","shelljs":"~0.3.0","wrench":"~1.5.8","glob":"~4.0.0","uglify-js":"~2.4.13","less":"~1.7.0","uglifycss":"~0.0.5","path-to-regexp":"~0.1.2"},"repository":{"type":"git","url":"git://github.com/ecomfe/edpx-zhixin.git"},"bugs":{"url":"https://github.com/ecomfe/edpx-zhixin/issues"},"contributors":[{"name":"sekiyika","email":"px.pengxing@gmail.com"}],"author":"","license":"ISC","devDependencies":{"jasmine-node":"^1.14.2"},"homepage":"https://github.com/ecomfe/edpx-zhixin","_id":"edpx-zhixin@0.1.8","dist":{"shasum":"d56ff59b221f0a4ab5027b0dac1a05c2de9bd242","tarball":"https://registry.npmjs.org/edpx-zhixin/-/edpx-zhixin-0.1.8.tgz","integrity":"sha512-cLCGK12tWVs+oW8AnoZJ0uifYKFO9gSFSeYDLpdXxiTBAR0PV1NVUiS6AV6dyk3qAf8z3LxorBI0WNMVHDQUhg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTQ42qCYA5LBUwt5X1P7GVOY4WSo+vgNUko75XNYa8ygIhAK+edc7us/d0Pxk08kmOzsiqIVqKFg8KqDqX4SKSHOFG"}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"sekiyika","email":"pengxing5501854@gmail.com"},"maintainers":[{"name":"sekiyika","email":"pengxing5501854@gmail.com"}]},"1.0.0":{"name":"edpx-zhixin","version":"1.0.0","description":"edp zhixin package","scripts":{"test":"make -C test"},"dependencies":{"edp-core":"~1.0.4","edp-config":"~1.0.0","edp-webserver":"1.0.17-beta.3","edp-watch":"~0.1.3","shelljs":"~0.3.0","wrench":"~1.5.8","glob":"~4.0.0","uglify-js":"~2.4.13","less":"~1.7.0","uglifycss":"~0.0.5","path-to-regexp":"~0.1.2"},"repository":{"type":"git","url":"git://github.com/ecomfe/edpx-zhixin.git"},"bugs":{"url":"https://github.com/ecomfe/edpx-zhixin/issues"},"contributors":[{"name":"sekiyika","email":"px.pengxing@gmail.com"}],"author":"","license":"ISC","devDependencies":{"jasmine-node":"^1.14.2"},"gitHead":"40a8ddbb2b5ed517f1b6c514dc9b1f80b3a9372d","homepage":"https://github.com/ecomfe/edpx-zhixin","_id":"edpx-zhixin@1.0.0","_shasum":"6e8e9f1aaec42e521c913aa0f65cffdeba307a44","_from":".","_npmVersion":"2.3.0","_nodeVersion":"0.10.36","_npmUser":{"name":"sekiyika","email":"pengxing5501854@gmail.com"},"maintainers":[{"name":"sekiyika","email":"pengxing5501854@gmail.com"}],"dist":{"shasum":"6e8e9f1aaec42e521c913aa0f65cffdeba307a44","tarball":"https://registry.npmjs.org/edpx-zhixin/-/edpx-zhixin-1.0.0.tgz","integrity":"sha512-bgVuHz0Tyf6OH9qDRvxnxEb1g2CzYNjXulHuwIMsCdJ5rYTllACYVWKF1nXlfLAL8EndEykW4MJqJUNdrKCMQw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCNYHoLxsip/SirUq4NjC1gcw0LYHMq4LeRaev5htENaQIhANlcRbl6h7VIpSm0TMxJoaG/8LsDXuFikb22AcjRRzgK"}]}},"1.0.1":{"name":"edpx-zhixin","version":"1.0.1","description":"edp zhixin package","scripts":{"test":"make -C test"},"dependencies":{"edp-core":"~1.0.4","edp-config":"~1.0.0","edp-webserver":"1.0.17-beta.3","edp-watch":"~0.1.3","shelljs":"~0.3.0","wrench":"~1.5.8","glob":"~4.0.0","uglify-js":"~2.4.13","less":"~1.7.0","uglifycss":"~0.0.5","path-to-regexp":"~0.1.2"},"repository":{"type":"git","url":"git://github.com/ecomfe/edpx-zhixin.git"},"bugs":{"url":"https://github.com/ecomfe/edpx-zhixin/issues"},"contributors":[{"name":"sekiyika","email":"px.pengxing@gmail.com"}],"author":"","license":"ISC","devDependencies":{"jasmine-node":"^1.14.2"},"gitHead":"40a8ddbb2b5ed517f1b6c514dc9b1f80b3a9372d","homepage":"https://github.com/ecomfe/edpx-zhixin","_id":"edpx-zhixin@1.0.1","_shasum":"d24dccbb35ff2af1dad27ec580b1dce6354b615c","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.12.2","_npmUser":{"name":"sekiyika","email":"pengxing5501854@gmail.com"},"dist":{"shasum":"d24dccbb35ff2af1dad27ec580b1dce6354b615c","tarball":"https://registry.npmjs.org/edpx-zhixin/-/edpx-zhixin-1.0.1.tgz","integrity":"sha512-vEPuJTGCZ6mXv4oblkl0829Lx96FhoJTEFESRxp4Vls66YruFkRGdrub408G0cddxqmRW0IlI9r2RvM5aByp/w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDurwl5OmuBRevBRfPa/uy7HavZYvocjprHi5n7qM9LeAIgTD6fcYerMGD+76L3C/ux2kb7VJaYsdiON3rgqbHj60U="}]},"maintainers":[{"name":"sekiyika","email":"pengxing5501854@gmail.com"}]}},"readme":"# edpx-zhixin\n\n[![Build Status](https://travis-ci.org/ecomfe/edpx-zhixin.png?branch=master)](https://travis-ci.org/ecomfe/edxp-zhixin) [![Dependencies Status](https://david-dm.org/ecomfe/edpx-zhixin.png)](https://david-dm.org/ecomfe/edpx-zhixin)\n\n\n`edpx-zhixin`是edp的一个扩展，提供给百度的FE开发搜索结果页模板的工具\n\n### 启动edpx-zhixin\n\n通过下面的命令，将根据默认的配置文件`edpx-zhixin-config.js`，启动edpx-zhixin，edpx-zhixin会在当前目录查找配置文件，如果没找到，会一直向上级目录查找，找到为止。在`默认`情况下，edpx-zhixin会使用`8848`作为默认端口，并且将`当前目录`作为 `documentRoot`\n\n```\n$ edp zhixin start\n10:45:21 [INFO] monitor -> /Users/sekiyika/Documents/work/src\n10:45:21 all plugins have been loaded.\nedp INFO EDP WebServer start, http://192.168.1.106:8848\nedp INFO root = [/Users/sekiyika/Documents/work/src/], listen = [8848]\n```\n\n### 指定配置文件\n\n通过`--config`参数，可以指定edpx-zhixin的配置文件\n\n```\n$ edp zhixin start --config=src/edpx-zhixin-config.js\n10:52:26 [INFO] monitor -> /Users/sekiyika/Documents/work/src\n10:52:26 all plugins have been loaded.\nedp INFO EDP WebServer start, http://192.168.1.106:8848\nedp INFO root = [/Users/sekiyika/Documents/work/src/], listen = [8848]\n```\n\n### 目录结构\n\n`edpx-zhixin`要求开发者遵循目录规范，如下：\n\n    edpx-zhixin-config.js\n    src\n        page\n            ecl_ec_weigou\n                config.js\n                _page.tpl\n                page.tpl\n                page.html\n                data.json\n                ...\n\n\n### 配置edpx-zhixin\n\n运行`edp zhixin start`时，需要`edpx-zhixin-config.js`文件，下面是构成`edpx-zhixin-config.js`的默认配置\n\n```javascript\n/**\n * @file edpx-zhixin-config.js\n */\n\n/**\n * edpx-zhixin的配置\n */\nexports.server = {\n    documentRoot: './', // documentRoot以配置文件所在的目录来计算绝对路径，默认为process.cwd()\n    port: 8848 // edpx-zhixin的启动端口，默认为8848\n};\n\n/**\n * 用来配置开发环境依赖的结果页机器地址，可以配置线下机器\n * 默认hostname是www.baidu.com，port为80\n */\nexports.proxy = {\n    hostname: 'www.baidu.com',\n    port: 80\n};\n\n/**\n * 如果网页中有同名模板，默认干掉同名模板\n */\nexports.removeSameTpl = true;\n\n\n/**\n * wise相关的host\n */\n//exports.proxy = {\n//    hostname: 'm.baidu.com',\n//    port: 80\n//};\n\n/**\n * 指定php可执行的路径\n * @type {string}\n */\nexports.php = 'php'; // 指定渲染模板使用的php路径，如果path中有，写php即可\n\n/**\n * 指定依赖的base文件，默认会使用edpx-zhixin中自带的c_base.tpl和c_right_base.tpl文件\n */\nexports.base = {\n    left: 'c_base.tpl',\n    right: 'c_right_base.tpl'\n};\n\n/**\n * wise相关的base文件\n */\n// exports.base = 'wise';\n```\n\n###开发模板\n\n从新建模板到release，都提供了相应的命令和工具\n\n#### edp zhixin init\n\n在行业目录下运行`edp zhixin init ecl_fn_demo`，如下：\n\n```\n$ edp zhixin init ecl_fn_demo\n>> Do you really want to init `ecl_fn_demo` project in `/Users/sekiyika/Documents/work/src/finance` ?(y/n)y\n>> There is a exist project, cover it ?(y/n)y\nedp INFO >> `/Users/sekiyika/Documents/work/src/finance/page/ecl_fn_demo` create success.\n...\nedp INFO >> `/Users/sekiyika/Documents/work/src/finance/page/ecl_fn_demo/config.js` create success.\n```\n\n这样就构建好了一个模板开发所需的基本文件\n\n#### edp zhixin initwise\n\n创建wise相关的模板命令:\n\n```\nedp zhixin initwise [--root|-r] [--platform|-p] [--data|-d]\n```\n\n目前支持的wise平台为 iphone,utouch,big，在访问的时候url后缀添加\n\n&tn=iphone、&tn=utouch、&tn=big， 切换到相应的平台\n\n例如：\n\nhttp://m.baidu.com/s?word=%E7%94%B7%E7%A7%91%E5%8C%BB%E9%99%A2&sa=tb&st=111041&tn=utouch\n\n会调用utouch版本的模板\n\n\n#### 使用 utpl 支持模板编写\n\n集成utpl的模板功能，在`_page.tpl`中引入后，自动编译成相关的函数使用，\nutpl语法同`underscore.js`的模板语法类似，请参考[underscore](http://documentcloud.github.io/underscore/) 获取更多信息\n\n例如：\n\n\n_page.tpl 内容：\n\n```\n{%*include file=\"./ajax-list.utpl\"*%}\n```\n\n注：形如：`ajax-list.utpl`会被编译成`ajaxListRender`函数，可以在js中直接调用\n\najax-list.utpl 内容：\n\n```\n/*utpl:innerFn=false,strip=false*/\n<!--列表项目-->\n<ul>\n    {%each(tplData.list, function (item, index) {%}\n        <li><a href=\"{%=item.link%}\">{%=escape(item.title)%}</a></li>\n    {%});%}\n</ul>\n<!--记录数-->\n{%var len = tplData.list.length;%}\n{%if (len !== 0) {%}\n    {%=len%}条记录\n{%}%}\n```\n\n其中\n\n```\n/*utpl:innerFn=false,strip=false*/\n```\n\n为编译选项：\n\n1. innerFn=false，表示`each`,`escape`等函数不会在模板中内置，需要外部提供\n\n2. strip=false，表示不会自动去除空格、注释\n\n\n\n##### config.js\n\n`config.js`是每个模板目录下都需要的一个配置文件，主要包含和该模板相关的配置\n\n```javascript\nexports.config = {\n    tpl: 'ecl_fn_demo', // 模板名\n    querys: [\n        'iphone',  // 命中该模板时的query，不指定data会默认使用data.json文件作为数据文件\n        {\n            query: '游戏',\n            data: 'data.json' // 指定渲染所需要使用的数据文件\n        }\n    ],\n    side: 'left', // 模渲染的位置，有left和right的取值\n    platform: ['ipad', 'pc'], // 该模板适用于ipad或者pc，根据url中的dsp参数来区分，可以为platform: 'pc'\n    //platform: ['iphone', 'utouch', 'big'], //wise相关的platform，根据url中的tn参数来区分，tn=utouch，会切换到简版模板\n    ajaxs: [ // 代理请求的数据，常用于代理/ecomui的请求\n        {\n            url: /a.js/,\n            file: 'a_1.js', // file和handler是互斥的关系，handler优先级更高\n            handler: function(request) {\n                return fs.readFileSync('data.json')\n            }\n        }\n    ],\n    //build: 'release', // 缺省相当于 edp zhixin build，加上相当于 edp zhixin release （下文提及）\n    watch: { // 监控源文件的变化并编译产出page.tpl文件\n        filters: [\n            '_page.tpl',\n            '*.less'\n        ],\n        events: [\n            'addedFiles',\n            'modifiedFiles'\n        ]\n    }\n};\n```\n\n#### edp zhixin start\n\n`edpx-zhixin`启动时，会查找`documentRoot`目录下的所有`config.js`文件，然后根据`config.js`文件建立query到模板之间的索引\n\n启动之后，可以通过`http://127.0.0.1:8848`访问\n\n**注意**：在这里推荐配一个host，搜索结果���大部分静态文件都做了`referrer`过滤，非百度域可能会遇到403 forbidden，导致文件加载失败\n\n\n#### edp zhixin build\n\n`build`可以让用户手动编译生成page.tpl文件，代码不压缩\n\n#### edp zhixin release\n\n开发完成模板之后，需要发布压缩后的代码，`release`比`build`多做了一步就是编译压缩\n\n\n\n","maintainers":[{"name":"sekiyika","email":"pengxing5501854@gmail.com"}],"time":{"modified":"2022-06-16T05:36:33.916Z","created":"2014-05-15T03:49:38.561Z","0.1.0":"2014-05-15T03:49:38.561Z","0.1.1":"2014-05-15T06:27:01.201Z","0.1.2":"2014-05-16T06:39:38.344Z","0.1.3":"2014-05-21T03:12:25.494Z","0.1.4":"2014-05-22T02:24:51.270Z","0.1.5":"2014-06-20T08:47:52.522Z","0.1.6":"2014-07-28T08:57:17.467Z","0.1.7":"2014-08-29T03:41:32.867Z","0.1.8":"2014-11-05T12:08:48.545Z","1.0.0":"2015-02-10T03:13:15.505Z","1.0.1":"2015-05-14T09:57:51.756Z"},"homepage":"https://github.com/ecomfe/edpx-zhixin","repository":{"type":"git","url":"git://github.com/ecomfe/edpx-zhixin.git"},"contributors":[{"name":"sekiyika","email":"px.pengxing@gmail.com"}],"bugs":{"url":"https://github.com/ecomfe/edpx-zhixin/issues"},"license":"ISC","readmeFilename":"README.md","users":{"lzfee0227":true}}