Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

minifyify

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minifyify - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

2

package.json

@@ -21,3 +21,3 @@ {

],
"version": "3.0.1",
"version": "3.0.2",
"repository": {

@@ -24,0 +24,0 @@ "type": "git",

@@ -17,2 +17,3 @@ Minifyify

### Programmatic API
```js

@@ -24,3 +25,3 @@ var browserify = require('browserify')

bundler.plugin('minifyify', options);
bundler.plugin('minifyify', {map: 'bundle.map.json'});

@@ -32,6 +33,11 @@ bundler.bundle(function (err, src, map) {

The map option should be the location of the sourcemap on your server, and is used to insert the `sourceMappingURL` comment in `src`.
### Command Line
```sh
browserify entry.js -p [minifyify --output bundle.map.json] > bundle.json
$ browserify entry.js -p [minifyify --map bundle.map.json --output bundle.map.json] > bundle.js
```
The `--output` option is a required option unique to the command line interface and specifies where minifyify should write the sourcemap to on disk.
## Options

@@ -38,0 +44,0 @@

@@ -14,8 +14,9 @@ /* globals jake */

var appname = 'simple file'
, mapFile = 'bundle.clied.map.json'
, browserify = path.join(path.dirname(require.resolve('browserify')), 'bin', 'cmd.js')
, minifyify = path.join(__dirname, '..', 'lib', 'index.js')
, outFile = path.join(fixtures.buildDir, 'apps', appname, 'bundle.clied.js')
, outMapFile = path.join(fixtures.buildDir, 'apps', appname, 'bundle.clied.map.json')
, outMapFile = path.join(fixtures.buildDir, 'apps', appname, mapFile)
, cmd = browserify + ' "' + jsesc(fixtures.entryScript(appname), {quotes: 'double'}) +
'" -p [ "' + jsesc(minifyify, {quotes: 'double'}) + '" --output "' + jsesc(outMapFile, {quotes: 'double'}) + '" ] > "' +
'" -p [ "' + jsesc(minifyify, {quotes: 'double'}) + '" --map ' + mapFile + ' --output "' + jsesc(outMapFile, {quotes: 'double'}) + '" ] > "' +
jsesc(outFile, {quotes: 'double'}) + '"'

@@ -42,3 +43,5 @@ , ex = jake.createExec(cmd)

assert.doesNotThrow(function () {
validate(fs.readFileSync(outFile).toString(), fs.readFileSync(outMapFile).toString())
var src = fs.readFileSync(outFile).toString();
validate(src, fs.readFileSync(outMapFile).toString());
assert.ok(src.indexOf(mapFile) >= 0, 'The map argument should have been used');
}, 'The bundle should have a valid external sourcemap');

@@ -45,0 +48,0 @@ next();

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc