markstory / mini-asset

A simple set of asset build tools that provides a config file and extensible integrations with pre-processors & minifiers.
MIT License
64 stars 17 forks source link

Problem with UgilfyJs command #39

Closed szymach closed 7 years ago

szymach commented 7 years ago

Hey, in this line the options are always prepended with a -, but why? It causes errors in my build (using UglifyJs 1.3.8 and node 4.2.6), since it treats - as a file to uglify. Am I doing something wrong, or is this an error? Thanks in advance for the reply.

markstory commented 7 years ago

The - is used to tell uglify that we're going to be piping in the javascript code via stdin, instead of giving it filenames. You can simulate how mini-asset works on the command line using:

cat path/to/file.js | node_modules/.bin/uglifyjs - -m
szymach commented 7 years ago

Alright, but do you have any idea why it treats the dash as a filename? There is no way for me to modify the command through configuration, so currently I am stuck with just removing it in vendor code.

markstory commented 7 years ago

No idea. Are you on windows? You might want to try a newer version of uglify as well.

szymach commented 7 years ago

Hey, Sorry but I stopped using your tool, so I am closing this issue. Best of luck anyways and thanks for the help.