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

enb-uglifyjs

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enb-uglifyjs - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

lib/uglifyjs-minifier.js

2

package.json
{
"name": "enb-uglifyjs",
"version": "1.0.0",
"version": "1.1.0",
"scripts": {

@@ -5,0 +5,0 @@ "test": "echo \"Error: no test specified\" && exit 1"

@@ -21,3 +21,3 @@ # enb-uglifyjs

```javascript
[ require('enb-uglifyjs/techs/uglifyjs'), { source: '?.js', target: '_?.js' ;
[ require('enb-uglifyjs/techs/uglifyjs'), { source: '?.js', target: '_?.js' } ];
```

@@ -18,3 +18,4 @@ /**

var UglifyJS = require('uglify-js');
var vow = require('vow');
var asyncFs = require('enb').asyncFs || require('enb/lib/fs/async-fs');
var path = require('path');

@@ -28,4 +29,12 @@ module.exports = require('enb/lib/build-flow').create()

.builder(function (source) {
return UglifyJS.minify(source).code;
var queue = this.node.getSharedResources().jobQueue;
// Читаем код асинхронно вместо синхронного чтения средствами UglifyJS
return asyncFs.read(source, 'utf-8').then(function(code){
var minifierFilename = path.resolve(__dirname, '../lib/uglifyjs-minifier');
return queue.push(minifierFilename, code, {fromString:true})
.then(function (resultObj) {
return resultObj.code;
});
});
})
.createTech();
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