vue-format icon indicating copy to clipboard operation
vue-format copied to clipboard

How to make it arrange content like this: template > js > style

Open acrolink opened this issue 7 years ago • 3 comments

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?

acrolink avatar Oct 12 '17 05:10 acrolink

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

igorparrabastias avatar May 12 '18 00:05 igorparrabastias

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.

turigeza avatar Aug 15 '18 21:08 turigeza