百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
D

deamdify

> 编程语言
开源

Browserify 转换器,可将 AMD 转换为 CommonJS。

197 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

Browserify 转换器,可将 AMD 转换为 CommonJS。

deAMDify

This module is a browserify plugin that will transform AMD modules into Node.js-style modules so that they can be included in browser-ified bundles.

With this transform in place, Node and AMD modules can be freely intermixed, and the resulting bundle can be used without the need for a separate loader such as RequireJS.

For when you're stuck and need help:

Install

bash
$ npm install deamdify

Usage

Command Line

Bundle up all required modules, including AMD modules, into a single file using browserify with the deamdify transform.

bash
browserify -t deamdify main.js -o bundle.js

API

javascript
var browserify = require('browserify');
var fs = require('fs');

var b = browserify('main.js');
b.transform('deamdify');

b.bundle().pipe(fs.createWriteStream('bundle.js'));

package.json

For packages that are written as AMD modules, add a browserify transform field to package.json and browserify will apply the transform to all modules in the package as it builds a bundle.

{
  "name": "anchor",
  "main": "main",
  "browserify": {
    "transform": "deamdify"
  }
}

Tests

bash
$ npm install
# fast run
$ npm run test-main
# test all browserify major versions
$ npm test

Credits

  • Jared Hanson

License

The MIT License

Copyright (c) 2015 Jared Hanson

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言