-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
0.2.4: Support custom file types. Always use latest for dependencies
- Loading branch information
Showing
25 changed files
with
178 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
"use strict"; | ||
var grunt = require("grunt"), | ||
exec = require("child_process").exec; | ||
|
||
(function() { | ||
|
||
function beautifyAndassert(test, task, actualFile, expectedFile) { | ||
exec("grunt " + task, function(error, stdout, stderr) { | ||
var actual = grunt.file.read("tmp/fileMapping/" + actualFile), | ||
expected = grunt.file.read("tmp/fileMapping/" + expectedFile); | ||
test.equal(actual, expected, "should beautify js " + actualFile + " using config file"); | ||
test.done(); | ||
}); | ||
} | ||
|
||
exports["fileMapping_test"] = { | ||
"beautification of js file using file mapping": function(test) { | ||
test.expect(1); | ||
beautifyAndassert(test, "jsbeautifier:fileMapping", "not-beautified.js.erb", "expected/beautified.js.erb"); | ||
}, | ||
"beautification of css file using file mapping": function(test) { | ||
test.expect(1); | ||
beautifyAndassert(test, "jsbeautifier:fileMapping", "not-beautified.css.erb", "expected/beautified.css.erb"); | ||
}, | ||
"beautification of html file using file mapping": function(test) { | ||
test.expect(1); | ||
beautifyAndassert(test, "jsbeautifier:fileMapping", "not-beautified.html.erb", "expected/beautified.html.erb"); | ||
} | ||
}; | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
body { | ||
font-size: 14px; | ||
} |
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
test/fixtures/configFile/expected/withGruntFileOptions/test_expected.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
body { | ||
font-size: 14px; | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
test/fixtures/config_file/expected/withGruntFileOptions/test_expected.css
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
body { | ||
font-size: 14px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<title>Page Title</title> | ||
</head> | ||
|
||
<body> | ||
<div>Body Content</div> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
var temp = { | ||
hello: 1, | ||
world: 2 | ||
}; |
Oops, something went wrong.
Been trying to figure out why I am now getting the following warning when npm updating my project, and it seems like this commit caused it:
npm WARN unmet dependency /Users/Brian/Dropbox/Projects/L7/retriever/node_modules/grunt-jsbeautifier requires underscore.string@'latest' but will load npm WARN unmet dependency /Users/Brian/Dropbox/Projects/L7/retriever/node_modules/underscore.string, npm WARN unmet dependency which is version 2.3.3
What's the rationale for forcing users of your package to use the latest version of all your dependencies? For me to run things in a predictable (read: production) environment I can't just grab the latest of everything, but now I can't do anything with npm without beautifier yelling at me.