V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
karthao
V2EX  ›  程序员

关于前端loader,除了seajs,你们还用什么?

  •  
  •   karthao · 2013-12-26 09:30:17 +08:00 · 4594 次点击
    这是一个创建于 3772 天前的主题,其中的信息可能已经有所发展或是发生改变。
    16 条回复    1970-01-01 08:00:00 +08:00
    judasnow
        1
    judasnow  
       2013-12-26 09:42:36 +08:00
    requirejs ?
    GinoSin
        2
    GinoSin  
       2013-12-26 09:44:34 +08:00
    模块化的话,用seajs,requireJS

    旧的简单页面要用加载器 用In.js
    7anshuai
        3
    7anshuai  
       2013-12-26 10:01:23 +08:00
    headjs, 支持响应式设计, 特性检测, 文件加载
    steeeeps
        4
    steeeeps  
       2013-12-26 10:03:51 +08:00
    amd 吧,requirejs
    steeeeps
        5
    steeeeps  
       2013-12-26 10:04:14 +08:00
    loethen
        6
    loethen  
       2013-12-26 10:05:34 +08:00
    Modernizr
    ijse
        7
    ijse  
       2013-12-26 10:07:56 +08:00
    有个labjs,蛮简单的。

    国外更多使用requirejs
    yakczh
        8
    yakczh  
       2013-12-26 11:18:07 +08:00
    angularjs是用amd还是cmd?
    emric
        9
    emric  
       2013-12-26 11:51:19 +08:00
    @yakczh AngularJS 使用的是 AMD, 想少走弯路那就用 RequireJS.
    anubiskong
        10
    anubiskong  
       2013-12-26 11:53:19 +08:00
    requirejs ++
    Sivan
        11
    Sivan  
       2013-12-26 12:04:11 +08:00
    requireJS +1
    jiyinyiyong
        12
    jiyinyiyong  
       2013-12-26 12:18:31 +08:00
    @yakczh Angular 自带一套, 勉强可以搭配 RequireJS,
    国人的 Avalon[1] 倒是重现了 Angualar 并且内置 RequireJS
    https://github.com/RubyLouvre/avalon/

    考虑到要用 Handlebars 等英文社区各种模块, 我直接用 RequireJS 了
    aligo
        13
    aligo  
       2013-12-26 12:20:02 +08:00
    如果需要反load,打包到一个js文件,减少http请求,同时需要module来管理的做法
    可以试试:http://www.v2ex.com/t/94621

    XD
    davepkxxx
        14
    davepkxxx  
       2013-12-26 14:50:06 +08:00
    document.write
    robertlyc
        15
    robertlyc  
       2013-12-27 09:48:59 +08:00
    当然用requirejs seajs这种不伦不类的山寨货
    chemzqm
        16
    chemzqm  
       2013-12-28 01:44:15 +08:00
    requirejs 因为第三方支持很多一些
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1161 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 320ms · UTC 23:04 · PVG 07:04 · LAX 16:04 · JFK 19:04
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.