Skip to content

Commit 17e1e75

Browse files
committed
tentatively hooked up uglifyjs2 with source maps. Need to try it in a real project though.
1 parent e471438 commit 17e1e75

21 files changed

+38
-1185
lines changed

build/jslib/optimize.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,13 +384,13 @@ function (lang, logger, envOptimize, file, parse,
384384
uconfig.fromString = true;
385385

386386
if (config.generateSourceMaps && outFileName) {
387-
uconfig.outSourceMap = baseName + '.src';
387+
uconfig.outSourceMap = baseName;
388388
}
389389

390390
logger.trace("Uglify2 file: " + fileName);
391391

392392
try {
393-
result = uglify2.minify(fileContents, uconfig);
393+
result = uglify2.minify(fileContents, uconfig, baseName + '.src');
394394

395395
if (uconfig.outSourceMap && result.map) {
396396
file.saveFile(outFileName + '.src', fileContents);

build/jslib/source-map/array-set.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
* Licensed under the New BSD license. See LICENSE or:
55
* http://opensource.org/licenses/BSD-3-Clause
66
*/
7-
if (typeof define !== 'function') {
8-
var define = require('amdefine')(module);
9-
}
7+
108
define(function (require, exports, module) {
119

1210
/**

build/jslib/source-map/base64-vlq.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@
3434
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3535
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3636
*/
37-
if (typeof define !== 'function') {
38-
var define = require('amdefine')(module);
39-
}
37+
4038
define(function (require, exports, module) {
4139

4240
var base64 = require('./base64');

build/jslib/source-map/base64.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
* Licensed under the New BSD license. See LICENSE or:
55
* http://opensource.org/licenses/BSD-3-Clause
66
*/
7-
if (typeof define !== 'function') {
8-
var define = require('amdefine')(module);
9-
}
7+
108
define(function (require, exports, module) {
119

1210
var charToIntMap = {};

build/jslib/source-map/binary-search.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
* Licensed under the New BSD license. See LICENSE or:
55
* http://opensource.org/licenses/BSD-3-Clause
66
*/
7-
if (typeof define !== 'function') {
8-
var define = require('amdefine')(module);
9-
}
7+
108
define(function (require, exports, module) {
119

1210
/**

build/jslib/source-map/source-map-consumer.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
* Licensed under the New BSD license. See LICENSE or:
55
* http://opensource.org/licenses/BSD-3-Clause
66
*/
7-
if (typeof define !== 'function') {
8-
var define = require('amdefine')(module);
9-
}
7+
108
define(function (require, exports, module) {
119

1210
var util = require('./util');

build/jslib/source-map/source-map-generator.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
* Licensed under the New BSD license. See LICENSE or:
55
* http://opensource.org/licenses/BSD-3-Clause
66
*/
7-
if (typeof define !== 'function') {
8-
var define = require('amdefine')(module);
9-
}
7+
108
define(function (require, exports, module) {
119

1210
var base64VLQ = require('./base64-vlq');

build/jslib/source-map/source-map/array-set.js

Lines changed: 0 additions & 107 deletions
This file was deleted.

build/jslib/source-map/source-map/base64-vlq.js

Lines changed: 0 additions & 144 deletions
This file was deleted.

build/jslib/source-map/source-map/base64.js

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy