See #18. Force install of Coffee-Formatter for testing.

This commit is contained in:
Glavin Wiechert 2014-12-28 18:59:15 -04:00
parent 220fc7666d
commit c9ede3d59d
4 changed files with 6 additions and 2 deletions

View File

@ -29,3 +29,5 @@ before_install:
- brew install uncrustify
# PHP
# - pear install PHP_Beautifier-beta
# CoffeeScript
- npm install coffee-formatter

View File

@ -364,5 +364,6 @@ plugin.configDefaults = _.merge(
plugin.activate = ->
handleSaveEvent()
plugin.subscribe atom.config.observe("atom-beautify.beautifyOnSave", handleSaveEvent)
atom.workspaceView.command "beautify", beautify
atom.workspaceView.command "beautify:editor", beautify
atom.workspaceView.command "beautify:file", beautifyFile

View File

@ -115,13 +115,13 @@ module.exports =
strip ?= require("strip-json-comments")
externalOptions = JSON.parse(strip(contents))
catch e
console.log "Failed parsing config as JSON: " + configPath
# console.log "Failed parsing config as JSON: " + configPath
# Attempt as YAML
try
yaml ?= require("js-yaml")
externalOptions = yaml.safeLoad(contents)
catch e
console.log "Failed parsing config as YAML: " + configPath
console.log "Failed parsing config as YAML and JSON: " + configPath
externalOptions = {}
else
externalOptions = {}

View File

@ -101,6 +101,7 @@
"typescript-formatter": "~0.1.4"
},
"activationEvents": [
"beautify",
"beautify:editor",
"beautify:file",
"core:save",