olov/ng-annotate — pull request #8 by boneskull (2014-04-05 07:21:20+00:00)
Title: eschews JSON.stringify() for custom string join.  purpose: spaces

Hi,

The lack of spaces in the generated code (`["$scope","$location","$http"]`, etc.) was bothering me; I feel it's the responsibility of a JS minifier to remove them. Since this is the fault of `JSON.stringify()`, and all we're really doing is building an array, I replaced these calls with a custom function:

```js
function stringify(arr) {
return "[" + arr.map(function(arg) {
return '"' + arg.name + '"';
}).join(", ") + "]";
}
```

(Potential bonus: may be faster)

If you don't like this as default behavior, would you be amenable to a configuration option?

My use case:

I want to run `ng-annotate` on source code; not anything processed in any manner. Would rather not use [ngmin](https://github.com/btford/ngmin) as I feel it takes too many liberties (in addition to not having in-place annotating). So without this patch, I'd have to add another build step to beautify the code, and I don't really want to deal with configuring [js-beautify](https://github.com/einars/js-beautify).

thanks for this tool,
Chris