HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/buyercall_forms/buyercall/node_modules/browser-pack/bin/prepublish.js
#!/usr/bin/env node

var spawn = require('child_process').spawn;
var fs = require('fs');
var concat = require('concat-stream');
var path = require('path');

var uglify = spawn(
    require.resolve('uglify-js/bin/uglifyjs'),
    ['--wrap-iife', '-c', 'side_effects=false,screw_ie8=false', '--verbose', '--ie8', '--passes=5', '-m', '--source-map', '--', '-']
);

fs.createReadStream(path.join(__dirname, '..', 'prelude.js'))
    .pipe(uglify.stdin)
;

uglify.stdout
    .pipe(concat({ encoding: 'string' }, function (str) {
        fs.writeFileSync(path.join(__dirname, '..', '_prelude.js'), str.replace(/;\s*$/, ''));
    }))
;