• browserify总结


    一。browserify 简介

    browserify is a tool for compiling node-flavored commonjs modules for the browser

    You can use browserify to organize your code and use third-party libraries even if you don't use node itself in any other capacity except for bundling and installing packages with npm.

    The module system that browserify uses is the same as node, so packages published to npm that were originally intended for use in node but not browsers will work just fine in the browser too.
    官网链接
    简介就直接从官网上copy过来,重点信息都加粗了。

    二。学习总结

    browserify 可以使开发前端组件就像开发node后端一样----使用require引入依赖(无缝使用了node模块系统的优点),甚至可以使用node里面才有的东西(比如Buffer对象,events,crypto等)。然后最终将编写的模块编译成一个js文件。

    我的观点

    对于模块化

    browserify在他的handbook里面论述了前端模块系统(window globals,concatenate,AMD)的优缺点. 其中对挂载在window对象上这种方式的批判理由是:

    Instead of a module system, each file defines properties on the window global object or develops an internal namespacing scheme.
    This approach does not scale well without extreme diligence since each new file needs an additional

  • 相关阅读:
    Windows 7系统安装MySQL5.5.21图解
    VB中DateDiff 函数解释
    curl命令具体解释
    SecureCRT 6.7.1 注冊机 和谐 破解 补丁 方法
    CSDN--十年
    SxsTrace工具用法
    Gamma校正及其OpenCV实现
    Linux--对文件夹下的配置文件批量改动IP
    sublime配置全攻略
    awk笔记
  • 原文地址:https://www.cnblogs.com/yyrdl/p/4981708.html
Copyright © 2020-2023  润新知