New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

grunt-build-seajs

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

grunt-build-seajs - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

lib/uglify2.js

12

package.json
{
"name": "grunt-build-seajs",
"description": "Transport module for seajs.",
"version": "0.0.2",
"version": "0.0.3",
"homepage": "https://github.com/dreamstu/grunt-build-seajs",

@@ -16,3 +16,3 @@ "keywords": [

},
"license":"MIT",
"license": "MIT",
"author": {

@@ -22,4 +22,3 @@ "name": "dreamstu",

},
"devDependencies": {
},
"devDependencies": {},
"maintainers": [

@@ -30,3 +29,6 @@ {

}
]
],
"dependencies": {
"uglify-js": "^2.4.22"
}
}
var utils = require('../lib/utils');
var uglify2 = require('../lib/uglify2');
module.exports = function(grunt) {

@@ -13,3 +14,23 @@ var path = require('path');

var options = this.options({
id: ''
id: '',
uglify:{
min:true,//mini
options:{},//http://lisperator.net/uglifyjs/compress
output:{
indent_start : 0, // start indentation on every line (only when `beautify`)
indent_level : 4, // indentation level (only when `beautify`)
quote_keys : false, // quote all keys in object literals?
space_colon : true, // add a space after colon signs?
ascii_only : false, // output ASCII-safe? (encodes Unicode characters as ASCII)
inline_script : false, // escape "</script"?
width : 80, // informative maximum line width (for beautified output)
max_line_len : 32000, // maximum line length (for non-beautified output)
ie_proof : true, // output IE-safe code?
beautify : false, // beautify output?
source_map : null, // output a source map
bracketize : false, // use brackets every time?
comments : false, // output comments?
semicolons : true, // use semicolons to separate statements? (otherwise, newlines)
}//http://lisperator.net/uglifyjs/codegen
}
});

@@ -38,3 +59,3 @@ var wrap_prefix = 'define(function(require, exports, module) {';

if (options.autowrap && !rDefine.test(content)) {
if (!rDefine.test(content)) {
content = [wrap_prefix, content, wrap_suffix].join('\n');

@@ -72,2 +93,8 @@ }

var _dest = path.join(file.orig.dest,destUri,file.src[0]);
if(options.uglify){
contents = uglify2.compressor(file.src[0],contents,options.uglify);
if(options.uglify.min){
contents = uglify2.min(contents).code;
}
}
grunt.file.write(_dest, contents);

@@ -74,0 +101,0 @@ grunt.log.writeln('File "' + _dest + '" created.');

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