Skip to content

Commit

Permalink
Releasing AMDClean v0.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
gfranko committed Nov 26, 2013
1 parent 6f41b73 commit 5b5db69
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amdclean",
"version": "0.3.1",
"version": "0.3.2",
"description": "A build tool that converts AMD code to standard JavaScript",
"main": "./src/amdclean",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions src/amdclean.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! amdclean - v0.3.1 - 2013-11-25
/*! amdclean - v0.3.2 - 2013-11-26
* http://gregfranko.com/amdclean
* Copyright (c) 2013 Greg Franko; Licensed MIT*/

Expand Down Expand Up @@ -35,7 +35,7 @@
// The Public API object
publicAPI = {
// Current project version number
VERSION: '0.3.1',
VERSION: '0.3.2',
// Default Options
defaultOptions: {
'globalObject': false,
Expand Down
7 changes: 7 additions & 0 deletions test/specs/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ describe('amdclean specs', function() {
expect(cleanedCode).toBe(standardJavaScript);
});

it('should correctly normalize multi-level relative file paths', function() {
var AMDcode = "define('./foo/prototype/commonMethodName.js', ['example1', 'example2'], function(one, two) {});",
cleanedCode = amdclean.clean({ code: AMDcode, escodegen: { format: { compact: true } } }),
standardJavaScript = "var foo_prototype_commonMethodNamejs=function (one,two){}(example1,example2);";
expect(cleanedCode).toBe(standardJavaScript);
});

it('should correctly prefix reserved keywords with an underscore', function() {
var AMDcode = "define('foo', ['./function'], function(fn){ fn.bar(); });",
cleanedCode = amdclean.clean({ code: AMDcode, escodegen: { format: { compact: true } } }),
Expand Down

0 comments on commit 5b5db69

Please sign in to comment.