V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
The Go Programming Language
http://golang.org/
Go Playground
Go Projects
Revel Web Framework
fansekey

Martini 和 FIS 的结合

  •  
  •   fansekey · Apr 29, 2014 · 2434 views
    This topic created in 4381 days ago, the information mentioned may be changed or developed.
    FIS: https://github.com/fex-team/fis 前端解决方案
    Martini: http://martini.codegangsta.io Golang的一个开发框架

    Golang已经越来越被人们认可了,也除了不少框架,比如beego,比如Martini。我比较喜欢Martini框架带来的开发方式;简单明了,不累赘。

    FIS前端集成解决方案,解决了诸多前端问题,比如压缩、静态资源链接加时间戳(md5)、合并静态资源、本地路径和线上路径的分离、提供组件化的封装等等等,见官网。

    最近在学习Golang,顺便做了个middleware来结合Martini和FIS。
    Demo: https://github.com/xiangshouding/martini-fis-app
    middleware: https://github.com/xiangshouding/martini-middleware


    如果感兴趣,可以下载demo运行之;

    关于demo的一些说明:

    + 想url加上md5戳(跟时间戳一样的效果) $ gofis release -md remote //加m参数
    + 想合并所有的静态资源
    在demo src的fis-conf.js里面添加一行配置:

    fis.config.set('pack', {
    "static/aio.js": "**.js", //合并所有的js
    "static/aio.css": "**.css" //合并所有的css
    });
    1 replies    2014-04-29 18:49:29 +08:00
    fansekey
        1
    fansekey  
    OP
       Apr 29, 2014
    + 合并 $ gois release -pd remote //加p参数

    上面应该是gois 不是gofis,居然编辑不了,汗~
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1006 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 22:23 · PVG 06:23 · LAX 15:23 · JFK 18:23
    ♥ Do have faith in what you're doing.