Given markdown:
# Vue 2.0
## Quick Start
### Install
import task from 'tasco' | |
task('foo', t => { | |
t.input('./src/index.js') | |
.pipe(babel()) | |
.pipe(t.output('./dist')) | |
}) |
Given markdown:
# Vue 2.0
## Quick Start
### Install
const counter = pen({ | |
count: 0 | |
}) | |
.mutation('increment', ctx => { | |
ctx.state.count++ | |
}) | |
.render((h, ctx) => h('button', { | |
on: { | |
click: () => ctx.commit('increment') | |
} |
Given markdown code:
---
title: Hello world
description: nothing
---
how's it going?
fine, thanks.
// component oriented css | |
import {css} from 'cocss' | |
import cssDOM from 'cocss/dom' | |
const style = cssDOM.renderToString({ | |
color: 'red', | |
backgroundColor: 'cyan' | |
}) | |
// style: |
const str = ` | |
random() | |
// @remove-on-eject start | |
const foo = 'I will be removed' | |
// @remove-on-eject end | |
fn() | |
` | |
replaceSection({ | |
input: str, |
miku
会在启动时自动加载放在 ./app/models
里的 models,文件名默认首字母大写。
The routes:
// ./app/config/routes.js
export default {
'/': 'Home',
'/user/:username': 'UserInfo'
}
ui/ | |
└── layout/ | |
├── Header.vue // component code | |
├── Header.play.js // component play file | |
├── Header.test.js // component-specific unit tests | |
└── Header.fixtures.json // any mock data the component tests might need |
const statefulTitle = (oldTitle, set) => { | |
if (set) document.title = oldTitle | |
return newTitle => { | |
document.title = newTitle || oldTitle | |
} | |
} |
import SvgIcons from 'vue-svg-icons' | |
Vue.use(SvgIcons, { | |
icons: { | |
compass: require('vue-svg-icons/') | |
} | |
}) | |
// in your component | |
{ |