Skip to content

Instantly share code, notes, and snippets.

@str
Created April 5, 2020 23:03
Show Gist options
  • Save str/c875b906ffd938d4a1ec8b7477393d82 to your computer and use it in GitHub Desktop.
Save str/c875b906ffd938d4a1ec8b7477393d82 to your computer and use it in GitHub Desktop.
Vue ScriptFirst RFC
<script>
/**
* ScriptFirst is a demo to see if we can set the script tag first.
*
* The idea of adding the script tag before the template tag, is to be able to
* add documentation first, making it easier to understand what the custom Vue
* component is for.
*
* @author Stuardo Rodríguez <[email protected]>
* @version 0.1
*
* @todo [✔] Test if it works
* @todo [ ] Request for comments in Reddit.
*/
export default {
name: 'My ScriptFirst demo',
data: function() {
someData: foo,
another: bar,
}
}
</script>
<template>
<div>
<h1>My ScriptFirst demo</h1>
</div>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment