Comparing version 0.2.1 to 0.3.0
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
HTTP dependency
Supply chain riskContains a dependency which resolves to a remote HTTP URL which could be used to inject untrusted code and reduce overall package reliability.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
605529
3
37
15960
47
9
3
1
5
1
+ Addedbtoa@1.1.x
+ Addedosenv@0.0.x
+ Addedutilities@0.0.x
+ Addedbtoa@1.1.2(transitive)
+ Addedosenv@0.0.3(transitive)
+ Addedutilities@0.0.40(transitive)
- Removedasync@0.2.10(transitive)
- Removedoptimist@0.3.7(transitive)
- Removeduglify-js@2.3.6(transitive)
- Removedwordwrap@0.0.3(transitive)
Updateduglify-js@https://github.com/ben-ng/UglifyJS2/archive/sourcemap-offset-fix.tar.gz