| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| assets | ||
| templates | ||
| tests | ||
| __init__.py | ||
| models.py | ||
| settings.py | ||
| urls.py | ||
| utils.py | ||
| views.py |
Most JavaScript packages wrap their code in IIFEs, which is good.
Pipeline used to concatenate JS only with a newline. That can break those IIFES
though:
(function() {
// package A
}()) // No semicolon! Most people put one here, but unfortunately not all!
(function() {
// package B
}());
The above is equivalent to:
(function() {
// package A
}())(function() {
// package B
}());
Suddenly we have a function call!
With this commit, JS is concatenated with a newline followed by a semicolon,
which fixes the above issue:
(function() {
// package A
}()) // No semicolon! Most people put one here, but unfortunately not all!
;(function() {
// package B
}());
There is no need to worry about superfluos semicolons, such as:
(function() {
// package A
}());
;;(function() {
// package B
}());
That is still valid JavaScript and the extra semicolons will be removed by the
minifier.
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| assets | Loading commit data... | |
| templates | Loading commit data... | |
| tests | Loading commit data... | |
| __init__.py | Loading commit data... | |
| models.py | Loading commit data... | |
| settings.py | Loading commit data... | |
| urls.py | Loading commit data... | |
| utils.py | Loading commit data... | |
| views.py | Loading commit data... |