vue-format
vue-format copied to clipboard
How to make it arrange content like this: template > js > style
I have noticed that it places style at top then template then js. How to change that order and make it place template > js > style?
format: (state) ->
self = this
console.log atom
editor = atom.workspace.getActiveTextEditor()
text = editor.getText()
newTextArr = []
['css','html', 'js'].forEach((val, index) -> // here is the thing
newText = self.replaceText(text, val)
newTextArr.push(newText)
)
editor.setText(newTextArr.join('\n\n'))
ref: https://github.com/LeslieYQ/vue-format/blob/bb086b4d17baec828462fbb86106ef9904274694/lib/vue-format.coffee#L33
Style should always be the last according to the style guide https://vuejs.org/v2/style-guide/#Single-file-component-top-level-element-order-recommended
Please consider changing it. Otherwise we all have to edit the the code.