Comments (4)
The defines are evaluated, so it complains that a
is not defined. Evaluating arguments is probably not a good idea.
Any case, global defines should be constant. What would you actually expect from your sample, something like console.log(a,b)
?
from uglifyjs.
Not quite, I was hoping for console.log("a,b");
I use this as I have a dictionary in a text file which is easier to maintain using line breaks, so in my cake build script I read it, convert the newlines to commas, and use DICTIONARY.split(',')
in my main code. For now I've worked around it by changing my delimiter, however it'd still be good to solve this problem when defining strings.
from uglifyjs.
Ah, I see. That almost works:
echo 'console.log(TEST)' | uglifyjs2 -cd TEST='"a;b"'
→ console.log("a;b")
There's a bug currently if you include a comma, but it's just the command-line parser, nothing deep. I'll fix that.
Also note that you need to double the quotes (the first level is dropped by your shell).
from uglifyjs.
Yup, that's the work around I came to too! Thanks!
from uglifyjs.
Related Issues (20)
- Lacks support for Lambda Expressions (Mozilla AST Specifications) HOT 5
- Breaking change. HOT 5
- Argument names should not be reused as variables when `arguments` is referenced in a function HOT 1
- [email protected] eliminates "use strict" where it's needed HOT 2
- ufuzz failure
- ufuzz failure
- ufuzz failure
- ufuzz failure
- ufuzz failure HOT 1
- ufuzz failure
- ufuzz failure
- ufuzz failure
- ufuzz failure
- ufuzz failure
- ufuzz failure
- ufuzz failure
- ufuzz failure
- ufuzz failure
- ufuzz failure
- ufuzz failure
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uglifyjs.