Usage

In your Vue CLI Project

Install vue-cli-plugin-vucript first. Then, please addlang="vucript" to your Vue Single Component Files.

<script lang='vucript'>
import { reactive, computed } from 'Vucript';
let counter:reactive<number> = 0;
let add = () => {
  counter++;
};
const twiceTheCounter:computed<number> = (()=>counter*2);
</script>

Command Line Tool

Please install Vucript globally to use Vucript Command Line Tool.

$ npm install -g vucript
$ vucript component.ts

JS/TS API

Import Vucript and run Vucript.compile function!

import Vucript from "vucript";

let compiled = Vucript.compile(`let counter:reactive<number> = 0;`);//compile function returns compiled string.
Vucript.compileFile("./test/beforecompile/" + file, "./test/compiled/");//compileFile function compiles and save a file.

Last updated