Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Latest commit

 

History

History
64 lines (50 loc) · 1.42 KB

README.md

File metadata and controls

64 lines (50 loc) · 1.42 KB

Meteor Vue3 compiler

Forked from Meteor-vue3 to support compilers.

This Meteor Vue3 compiler is supported by Altruistiq and supports compiler plugins for templates and styling. Currently there are 2 compilere plugins available:

but it is rather easy to build additional compilers.

Install

meteor add seamink:meteor-vue3

Usage

Adding compilers you can now do

<template lang="pug">
  div
    h1 Hello World!
</template>

and

<style lang="scss" scoped>
.nice {
  .nested {
    sass {
      color: green;
    }
  }
}
</style>

and it will run and compile your Vue templates just fine.
For more details see the documentation for the compilers.

Creating compiler plugins

The compiler accepts any meteor build plugin that registers itself globally at

global.vue = global.vue || {}
global.vue.lang = global.vue.lang || {}

Example

global.vue.lang.pug = (input) => {
  // compile pug plugin function
  // must return html string
}

global.vue.lang.scss = (input) => {
  // compile sass plugin function
  // must return css string
}

It currently supports compilers for css and html. That means that the output of your compiler either needs to return css or html.