摘要: 在JavaScript模块化开发中,为了让同一个模块可以运行在前后端,以及兼容多种模块规范(AMD,CMD,Node),类库开发者需要将类库代码包装在一个闭包内。 AMD规范 AMD,即“异步模块定义”。主要实现比如: RequireJS。 其模块引用方式如下: 其中,id及依赖是可选的。其与Com 阅读全文
posted @ 2017-03-02 17:05 光尘9022 阅读(676) 评论(0) 推荐(0) 编辑
摘要: 使用npm帮助,看看npm有哪些命令可用 $> npm help Usage: npm <command> where <command> is one of: access, adduser, bin, bugs, c, cache, completion, config, ddp, dedupe 阅读全文
posted @ 2017-03-02 15:27 光尘9022 阅读(911) 评论(0) 推荐(0) 编辑