Format all internal CoffeeScript code to indent_size=2

- Using Atom Beautify's Beautify Directory feature
- Using coffee-fmt
  - Only has one bug: https://github.com/sterpe/coffee-fmt/issues/16
This commit is contained in:
Glavin Wiechert 2015-06-11 21:59:00 -03:00
parent 72e4384cf8
commit b0d8dfa6fb
70 changed files with 2996 additions and 2848 deletions

View File

@ -1,7 +1,7 @@
{ {
"indentation" : { "indentation" : {
"level" : "error", "level" : "error",
"value" : 4 "value" : 2
}, },
"line_endings" : { "line_endings" : {
"value" : "unix", "value" : "unix",

View File

@ -144,10 +144,12 @@
], ],
"devDependencies": { "devDependencies": {
"coffee-script": "^1.9.3", "coffee-script": "^1.9.3",
"coffeelint": "^1.10.1",
"handlebars": "^3.0.3" "handlebars": "^3.0.3"
}, },
"scripts": { "scripts": {
"prepublish": "npm run docs", "prepublish": "npm run docs",
"docs": "coffee docs/" "docs": "coffee docs/",
"lint": "coffeelint src/"
} }
} }

View File

@ -26,7 +26,7 @@ describe "BeautifyLanguages", ->
# All Atom packages that Atom Beautify is dependent on # All Atom packages that Atom Beautify is dependent on
dependentPackages = [ dependentPackages = [
'autocomplete-plus' 'autocomplete-plus'
'linter' # 'linter'
# 'atom-typescript' # it logs too much... # 'atom-typescript' # it logs too much...
] ]
# Add language packages to dependentPackages # Add language packages to dependentPackages

View File

@ -1,5 +1,5 @@
{ {
"indent_size": 4, "indent_size": 2,
"indent_char": " ", "indent_char": " ",
"indent_level": 0, "indent_level": 0,
"indent_with_tabs": false, "indent_with_tabs": false,

View File

@ -84,7 +84,7 @@ module.exports = class Beautifier
If platform is Windows If platform is Windows
### ###
isWindows: do -> isWindows: do ->
return /^win/.test(process.platform) return new RegExp('^win').test(process.platform)
### ###
Get Shell Environment variables Get Shell Environment variables

View File

@ -7,7 +7,9 @@ module.exports = class CoffeeFmt extends Beautifier
options: { options: {
# Apply language-specific options # Apply language-specific options
CoffeeScript: CoffeeScript:
tab: ["indent_size", "indent_char", "indent_with_tabs", (indentSize, indentChar, indentWithTabs) -> tab: ["indent_size", \
"indent_char", "indent_with_tabs", \
(indentSize, indentChar, indentWithTabs) ->
return "\t" if indentWithTabs return "\t" if indentWithTabs
Array(indentSize+1).join(indentChar) Array(indentSize+1).join(indentChar)
] ]

File diff suppressed because one or more lines are too long