Comparing version 0.0.3 to 0.0.4
@@ -17,3 +17,3 @@ var minify = require( './minify' ), | ||
if ( config.target.min && pkg.m8.nativeType( minify[config.type] ) == 'function' ) { | ||
if ( ( file_contents = minify[config.type]( file_contents ) ) !== null ) { | ||
if ( ( file_contents = minify[config.type]( ( file_name + file_ext ), file_contents ) ) !== null ) { | ||
pkg.fs.writeFileSync( file_name + '.min' + file_ext, file_contents, charset ); | ||
@@ -20,0 +20,0 @@ } |
var pkg = require( './packages' ); | ||
module.exports = { | ||
'application/javascript' : function( content ) { | ||
'application/javascript' : function( file, content ) { | ||
try { | ||
var jsp = pkg.ugy.parser, pro = pkg.ugy.uglify; | ||
return pro.gen_code( pro.ast_squeeze( pro.ast_mangle( jsp.parse( content ) ) ) ); | ||
return pkg.ugy.minify( file ).code; | ||
} // in these case a create file has been triggered when the file is saved but not valid | ||
@@ -9,0 +8,0 @@ catch ( e ) { // todo: should we check if the file is in a valid state, period, before re-writing it? |
@@ -19,3 +19,3 @@ { | ||
"n8iv" : ">= 0.2.9", | ||
"uglify-js" : ">= 1.3.0", | ||
"uglify-js" : ">= 2.2.1", | ||
"walkdir" : ">= 0.0.5" | ||
@@ -38,3 +38,3 @@ }, | ||
}, | ||
"version" : "0.0.3" | ||
"version" : "0.0.4" | ||
} |
14383
262
Updateduglify-js@>= 2.2.1