6

UglifyJS2を使用して単純な JavaScript ファイルを醜くしようとしました。

ファイルの内容は次のとおりです。

//this is simply a sample var
var sampleVar = "xyz";

//lots of comments
//this is just another comment
//such things should not be present in javascript
//waiting to see result after uglifying

//this is simply a sample function
function sampleFunction()
{
  var sampleLocalVar = "xzx";
  if(true)
  {
    //inserting some sample comments
    alert("in if block");
  }
  else
  {
    //inserting some sample comments
    alert("in else block");
  }
}

醜くするために使用しているコマンドは次のとおりです。

uglifyjs -c -m sample.js sample.min.js

私が受け取っているエラー:

Dot
Error parsing arguments in : sample.js
4

2 に答える 2