[slide]
const a = 1
let a = 1
var a = 1
docute.init({ | |
nav: [{ | |
path: '/get-started', | |
markdown: '**click** <button @click="count++">{{count}}</button>', | |
component: { | |
data: () => ({count: 0}) | |
} | |
}] | |
}) |
function quickSort(list) { | |
if (list.length < 2) { | |
return list | |
} | |
const candidate = list[list.length - 1] | |
const less = list.filter(i => i < candidate) | |
const greater = list.filter(i => i > candidate) | |
return [ |
{ | |
"foo": "foo" | |
} |
const Config = require('conpack') | |
const config = new Config() | |
module.exports = config | |
.entry('client') | |
.add('src/index.js') | |
.parent() | |
.entry('vendor') | |
.add(['vue', 'vuex']) |
given:
{
dist: /* @@dist */options.dist/* dist@@ */
}
replacer(input, {dist: 'dist'})
import {render} from 'vue-dom' | |
const App = { | |
template: '<h1>hello world</h1>' | |
} | |
render(App, '#app') | |
// on the server |
vbuild should be a dependency in the desktop app's app
folder.
const extract = require('path-extract') | |
const params = extract('/user/:username', '/user/egoist') | |
console.log(params) | |
//=> | |
{ | |
username: 'egoist' | |
} |