Permalink
Browse files

sync with 0.8.x 5f56346 to fix for Uglify #339

  • Loading branch information...
1 parent 9ba05d7 commit 5431dd6564a91f737bd14db698d2df2abe8b036a @rvagg rvagg committed Apr 9, 2012
Showing with 18 additions and 18 deletions.
  1. +1 −1 lib/minify.js
  2. +7 −7 package.json
  3. +2 −2 resources/source-package.mustache
  4. +8 −8 test/unit/source-package-test.js
View
2 lib/minify.js
@@ -40,7 +40,7 @@ var uglifyParser = require('uglify-js').parser
source = source.replace(reMultiComments, function(comment) {
comments.push(comment)
- return ';' + token + ';'
+ return token
})
try {
View
14 package.json
@@ -14,13 +14,13 @@
"node": ">= 0.6.0"
}
, "dependencies": {
- "npm": ">= 1.1.8"
- , "colors": ">= 0.3.0"
- , "uglify-js": ">= 0.0.1"
- , "async": ">= 0.1.9"
+ "npm": ">= 1.1.16"
+ , "colors": ">= 0.6.0"
+ , "uglify-js": ">= 1.2.6"
+ , "async": ">= 0.1.18"
, "hogan.js": ">= 2.0.0"
, "archy": ">= 0.0.2"
- , "colors-tmpl": ">= 0.0.2"
+ , "colors-tmpl": ">= 0.0.3"
, "xregexp": ">= 1.5.3"
}
, "directories": {
@@ -30,7 +30,7 @@
, "devDependencies": {
"buster": ">= 0.4.6"
, "rimraf": ">= 2.0.1"
- , "jshint": ">= 0.5.9"
+ , "jshint": ">= 0.6.0"
}
, "bin": {
"ender": "./bin/ender"
@@ -39,4 +39,4 @@
, "scripts": {
"test": "make"
}
-}
+}
View
4 resources/source-package.mustache
@@ -1,5 +1,5 @@
{{^options.noop}}
-!function () {
+(function () {
var module = { exports: {} }, exports = module.exports;
{{#mainSource}}
@@ -16,4 +16,4 @@
{{^enderSource}}
$.ender(module.exports);
{{/enderSource}}
-}();{{/options.noop}}{{#options.noop}}{{{mainSource.raw}}}{{/options.noop}}
+}());{{/options.noop}}{{#options.noop}}{{{mainSource.raw}}}{{/options.noop}}
View
16 test/unit/source-package-test.js
@@ -89,7 +89,7 @@ testCase('Source package', {
// don't be too clever here so we can be clever in the code we're testing.
// source indenting should be done by the caller, not here.
var src = ''
- src += '!function () {\n\n var module = { exports: {} }, exports = module.exports;\n'
+ src += '(function () {\n\n var module = { exports: {} }, exports = module.exports;\n'
if (options.main)
src += '\n' + options.main
src += '\n provide("' + options.name + '", module.exports);'
@@ -99,7 +99,7 @@ testCase('Source package', {
src += '\n\n' + options.ender
else
src += '\n $.ender(module.exports);'
- src += '\n}();'
+ src += '\n}());'
return src
}
@@ -136,15 +136,15 @@ testCase('Source package', {
+ ' 2\n'
+ ' 3\n'
})
- , '!function () {\n\n'
+ , '(function () {\n\n'
+ ' var module = { exports: {} }, exports = module.exports;\n\n'
+ ' this is a test\n\n'
+ ' 1\n'
+ ' 2\n'
+ ' 3\n\n'
+ ' provide("foobar", module.exports);\n'
+ ' $.ender(module.exports);\n'
- + '}();'
+ + '}());'
)
}
@@ -157,14 +157,14 @@ testCase('Source package', {
+ ' 2\n'
+ ' 3\n'
})
- , '!function () {\n\n'
+ , '(function () {\n\n'
+ ' var module = { exports: {} }, exports = module.exports;\n\n'
+ ' provide("foobar", module.exports);\n\n'
+ ' this is a test\n\n'
+ ' 1\n'
+ ' 2\n'
+ ' 3\n\n'
- + '}();'
+ + '}());'
)
}
@@ -181,7 +181,7 @@ testCase('Source package', {
+ ' 2\n'
+ ' 3\n'
})
- , '!function () {\n\n'
+ , '(function () {\n\n'
+ ' var module = { exports: {} }, exports = module.exports;\n\n'
+ ' main\n\n'
+ ' source\n'
@@ -191,7 +191,7 @@ testCase('Source package', {
+ ' 1\n'
+ ' 2\n'
+ ' 3\n\n'
- + '}();'
+ + '}());'
)
}
}

0 comments on commit 5431dd6

Please sign in to comment.