forked from salemhilal/atom-jsfmt
/
main.coffee
29 lines (25 loc) · 850 Bytes
/
main.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
JsfmtRunner = require './lib/jsfmtRunner'
module.exports =
# Configuration
config:
showErrors: # Whether or not to show the error bar
title: 'Show errors'
description: 'Do you want to know when something goes wrong?'
type: 'boolean'
default: 'true'
formatOnSave: # Whether or not to format automatically
title: 'Format on save'
description: 'Should files be formatted automatically on save?'
type: 'boolean'
default: 'true'
applyToJSXFiles:
title: 'Apply to JSX files (.jsx)'
description: 'Formats files with the .jsx extension. You should have a jsfmt rule to ignore the actual JSX'
type: 'boolean'
default: 'false'
# Start things up
activate: ->
JsfmtRunner.start()
# Turn things off
deactivate: ->
JsfmtRunner.stop()