Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide minified version #62

Closed
sindresorhus opened this issue May 16, 2012 · 5 comments
Closed

Provide minified version #62

sindresorhus opened this issue May 16, 2012 · 5 comments

Comments

@sindresorhus
Copy link

I tried to do it myself, but got some errors in Closure Compiler:

JSC_PARSE_ERROR: Parse error. missing name after . operator at line 2014 character 14
assert.throws = function (fn, type, msg) {
              ^
JSC_PARSE_ERROR: Parse error. missing ; before statement at line 2015 character 31
if ('string' === typeof type) {
                               ^
JSC_PARSE_ERROR: Parse error. syntax error at line 2016 character 6
msg = type;
      ^
JSC_PARSE_ERROR: Parse error. missing ) after argument list at line 2021 character 2
};
  ^
JSC_PARSE_ERROR: Parse error. missing ) after argument list at line 2093 character 2
};
  ^
JSC_PARSE_ERROR: Parse error. syntax error at line 2095 character 1
}); // module: interface/assert.js
 ^
JSC_PARSE_ERROR: Parse error. invalid return at line 3119 character 7
return require('chai');
       ^
JSC_PARSE_ERROR: Parse error. syntax error at line 3120 character 1
});
 ^
@logicalparadox
Copy link
Member

Out of curiosity, since Chai is a testing tool, what is the need for a minified version?

@sindresorhus
Copy link
Author

Keep the size of the repo down. We got a lot of JS in our TodoMVC project, and having minified JS helps a lot.

@logicalparadox
Copy link
Member

I realized with this is... throws is a reserved word and therefor the closure compiler is getting confused. I thought we got all traces of this but apparently not. I'll fix this and then you will be able to minify as needed.

@logicalparadox
Copy link
Member

Pushed new browser build to master branch. Give it a try and let me know if you have any more issues.

@logicalparadox
Copy link
Member

It looks like 1.0.1 compiles with no errors on the closure compiler now. I'm going to close this issue, but feel free to open back up if you have further issues with minifying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants