Socket
Socket
Sign inDemoInstall

browserify-wrap

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browserify-wrap

browserify-wrap, a _very simple_ browserify plugin to wrap your output bundle with a prefix or a suffix (or both)


Version published
Maintainers
1
Created

Readme

Source

browserify-wrap is a very simple browserify plugin to wrap your output bundle with a prefix and/or a suffix

Build Status Coverage Status Version License

API

const wrap = require('browserify-wrap');

var b = browserify();

b.plugin(wrap, {
  prefix : "[cool javascript prefix code here];"
});


b.plugin(wrap, {
  suffix : "[cool javascript suffix code here];"
});


b.bundle().pipe(somewhere);

wrap.concat(files [,sep])

As a common suffix might be to add some "raw" files, browserify-wrap provide a tiny helper for this (simple wrapper for map fs.readFileSync)

const wrap = require('browserify-wrap');
var suffix = wrap.concat(['file1.js', 'file2.js'], ';');
//suffix is now a concatenation of file1 & file2 (using ';' as separator)

Credits

  • 131

Keywords / shout box

browserify, prefix, suffix, wrapper, plugin, browserify-plugin

Keywords

FAQs

Package last updated on 05 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc