View Dockerfile
FROM base/archlinux
RUN pacman -Syu
RUN pacman -S --noconfirm git base-devel
WORKDIR /build
RUN useradd -d /build build-user
RUN echo "build-user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
RUN chown -R build-user /build
View load-vue-components-from-folder.js
const req = require.context('./components/', true, /\.(js|vue)$/i);
req.keys().map(key => {
const name = key.match(/\w+/)[0];
return Vue.component(name, req(key))
});
View mdl-vue.js
import 'material-design-lite'
Vue.mixin({
mounted() {
if (!this.$el || !this.$el.querySelectorAll) return;
componentHandler.upgradeElement(this.$el);
for (const el of this.$el.querySelectorAll('[class*=mdl-js-]')) {
if (!el.dataset.upgraded) {
componentHandler.upgradeElement(el);
View main.js
import Vue from 'vue';
import 'material-design-lite';
Vue.mixin({
mounted() {
for (const el of this.$el.querySelectorAll('[class*=mdl-js-]')) {
if (!el.dataset.upgraded) {
componentHandler.upgradeElement(el);
}
}
View Chart.vue
<template>
<canvas ref="chart"></canvas>
</template>
<script>
import chart from 'chart.js'
export default {
props: ['options', 'data'],
View App.vue
<style lang="scss">
@import "~material-design-lite/material.css";
</style>
View readme.md
npm i
npm start

Result:
Result

View vuetwo.md

vuetwo

Proof of concept library for building vue apps.
Basically a hacked together wrapper around rollup + rollup-watch with predefined setup.
vue template plugin is a slightly modified version of the new vue-template-compiler.

View vuetwo.md

vuetwo demo

Proof of concept vue for the lazy

Usage

  1. Download zip
  2. npm install
  3. npm start
View demo.md

#Demo

##About The demo is meant to show how to make an automated answer to a hn comment, translated from Norwegian to English with these steps:

  1. Click on Chrome address bar.
  2. Type translate.google.com and press enter.
  3. Click on input field.
  4. Type the text for translation and wait for it to translate.