Skip to content

Commit de58cf8

Browse files
committed
add samples
1 parent 52a41f4 commit de58cf8

File tree

4 files changed

+69
-1
lines changed

4 files changed

+69
-1
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
.DS_Store
2-
sample.vue

samples/arrow.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!--
2+
This is a bug in the current implementation. Ideally should be fixed
3+
in a rewrite using sublime-syntax format.
4+
-->
5+
6+
<template>
7+
<div @click="foo => foo()"></div>
8+
</template>

samples/basic.vue

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!--
2+
Things to verify:
3+
- comments (this block) are properly highlighted
4+
- expressions are highlighted as JS
5+
- <script> highlights ES2015 syntax
6+
- <style> highlights as CSS
7+
-->
8+
9+
<template>
10+
<div>
11+
{{ foo * 10 + 'hi' }}
12+
<span
13+
v-text="foo * 10 + 'hi'"
14+
:id="foo + 'baz'"
15+
@click="onClick('hello')">
16+
Hello
17+
</span>
18+
</div>
19+
</template>
20+
21+
<script>
22+
export default {
23+
data: () => ({
24+
foo: 'bar'
25+
})
26+
}
27+
</script>
28+
29+
<style>
30+
div {
31+
color: red;
32+
}
33+
</style>

samples/langs.vue

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!--
2+
Things to verify:
3+
- Langs are highlighted properly. Requires installing corresponding packages:
4+
- Stylus
5+
- Pug
6+
- Better CoffeeScript
7+
-->
8+
9+
<style lang="stylus">
10+
font-stack = Helvetica, sans-serif
11+
primary-color = #999
12+
body
13+
font 100% font-stack
14+
color primary-color
15+
</style>
16+
17+
<template lang="pug">
18+
div.app
19+
h1.title This is the app
20+
comp-a(foo="bar", :a=1)
21+
comp-b(bar="baz", :a=234)
22+
</template>
23+
24+
<script lang="coffee">
25+
module.exports =
26+
data: ->
27+
msg: 'Hello from coffee!'
28+
</script>

0 commit comments

Comments
 (0)