requireify

Browserify plugin to access all modules from browser console

MIT 16 个版本
安装
npm install requireify
yarn add requireify
pnpm add requireify
bun add requireify
README

requireify

Browserify v3 transform to allow access to all modules from browser console

Build Status

Usage

Usage

Install requireify locally to your project:

npm install requireify --save-dev

Then use it as Browserify transform or global transform module:

browserify --transform requireify main.js > bundle.js
# Will parse files in node_modules, for more see https://github.com/substack/node-browserify/issues/566
browserify --global-transform=requireify main.js > bundle.js
// /index.js
exports = module.exports = {
  hello: 'world'
};
  
// /foo/dep.js

var dep = require('./foo/dep');
console.log(dep.hello); // world

Now, inside your browser console, you can look up every module on the global require

>> var hello = require('/foo/dep').hello;
>> console.log(hello); // world

You can also include all libraries in the browser console that have been installed using npm and used in your browserify'd code.

版本列表
1.0.0 2015-09-28
0.2.1 2014-05-09
0.2.0 2014-03-01
0.1.4 2014-01-13
0.1.3 2013-12-24
0.1.2 2013-12-16
0.1.1 2013-12-08
0.1.0 2013-10-22
0.0.8 2013-10-01
0.0.7 2013-09-30
0.0.6 2013-09-28
0.0.5 2013-09-28
0.0.4 2013-09-25
0.0.3 2013-09-24
0.0.2 2013-09-20
0.0.1 2013-09-16