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 0.2.1 to 0.3.0

.travis.yml

25

package.json

@@ -14,3 +14,3 @@ {

],
"version": "0.2.1",
"version": "0.3.0",
"repository": {

@@ -23,15 +23,18 @@ "type": "git",

"concat-stream": "1.0.x",
"through": "2.3.x",
"source-map": "0.1.x",
"uglify-js": "https://github.com/ben-ng/UglifyJS2/archive/sourcemap-offset-fix.tar.gz",
"lodash": "1.3.x",
"utilities": "0.0.x",
"osenv": "0.0.x",
"atob": "1.1.x",
"source-map": "0.1.x",
"uglify-js": "2.3.x",
"through": "2.3.x",
"lodash": "1.3.x"
"btoa": "1.1.x"
},
"scripts": {},
"scripts": {
"test": "jake test --trace"
},
"devDependencies": {
"browserify": "latest"
, "jake": "latest"
, "jquery-browserify": "1.8.x"
, "ribcage-view": "0.0.x"
, "hbsfy": "0.1.x"
"browserify": "https://github.com/ben-ng/node-browserify/archive/master.tar.gz",
"jake": "latest",
"backbone":"1.0.x"
},

@@ -38,0 +41,0 @@ "optionalDependencies": {},

@@ -5,2 +5,4 @@ Minifyify

[![Build Status](https://travis-ci.org/ben-ng/minifyify.png?branch=master)](https://travis-ci.org/ben-ng/minifyify)
Before, browserify made you choose between sane debugging and sane load times. Now, you can have both.

@@ -10,7 +12,2 @@

## Known Issues
* Help! Source maps for backbone apps are broken. See [issue #1](https://github.com/ben-ng/minifyify/issues/1) for more info.
* Tests aren't complete yet while I focus on fixing [#1](https://github.com/ben-ng/minifyify/issues/1)
## Usage

@@ -23,7 +20,10 @@

, bundle = new browserify()
, transforms = [require('hbsfy')]
, opts = {
// The URL the source is available at
file: '/bundle.js'
// The URL this map is available at
, map: '/bundle.map'
// Use this option to compress paths

@@ -33,2 +33,6 @@ , compressPaths: function (p) {

}
// If you use transforms, specify them here
// Do *not* apply them to the bundle yourself!
, transforms: transforms
};

@@ -38,10 +42,7 @@

// You *must* run in debug mode!
bundle.bundle({debug: true})
// Pipe output to minifyify
.pipe(minifyify(function(code, map) {
minifyify(bundle, opts, function(code, map) {
// SourceMappingURL comment is already added for you at this point
fs.writeFileSync('www/bundle.js', code);
fs.writeFileSync('www/bundle.map', map);
}, opts));
});
```

@@ -48,0 +49,0 @@

@@ -1,9 +0,17 @@

var Ribcage = require('ribcage-view')
, View = Ribcage.extend({
template: require('./view.hbs')
, context: function () {
return {message: 'Hello From View Line 5'};
}
});
var Backbone = require('backbone')
, $ = require('../libraries/Jquery')
, _ = require('lodash')
, View;
Backbone.$ = $;
View = Backbone.View.extend({
template: _.template('<%= message %>')
, render: function () {
this.el.innerHTML = (this.template({message: 'Hello From View Line 5'}));
return this;
}
});
module.exports = View;
var path = require('path')
, FIXTURES_DIR = path.join(__dirname)
, BUILD_DIR = path.join(__dirname, '..', 'build')
, SCAFFOLD_DIR = path.join(__dirname, '..', 'build', 'scaffold')
, entryScript = function (name) {
return path.join(FIXTURES_DIR, name, 'entry.js');
}
, bundledFile = function (name) {
return path.join(FIXTURES_DIR, name, 'bundle.js');
, bundledDir = function (name) {
return path.join(BUILD_DIR, 'apps', name);
}
, bundledMap = function (name) {
return path.join(FIXTURES_DIR, name, 'bundle.map');
, bundledFile = function (name, uuid) {
return path.join(BUILD_DIR, name, 'bundle.min.js');
}
, bundledMap = function (name, uuid) {
return path.join(BUILD_DIR, name, 'bundle.map.json');
}
, simplifyPath = function (filePath) {

@@ -20,4 +25,7 @@ return path.relative(FIXTURES_DIR, filePath);

, bundledFile: bundledFile
, bundledDir: bundledDir
, bundledMap: bundledMap
, dir: FIXTURES_DIR
, buildDir: BUILD_DIR
, scaffoldDir:SCAFFOLD_DIR
};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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