vuecc-compiler

0.1.0 • Public • Published

Vue component compiler by @stpettersens

🗻 Unoffical "compiler" for Vue.js components written in a class-based style.

Build Status Build status npm version Dependency Status Development Dependency Status

This compiler allows you to write components like so:

// Greeter Vue instance in TypeScript
 
/// <reference path="vue-instance.ts" />
 
class Greeter extends VueInstance {
    constructor() {
        super();
        this.el = '#greeter';
        this.name = 'greeter'; // For outside access (e.g. javascript:greeter.sayHi()).
        this.data = {
            name: 'Sam'
        };
    }
 
    public ready(): void {
        this.sayHi();
    };
 
    public sayHi(): void {
        console.log(`Hi, ${name}.`);
    };
}
Install:

npm install -g vuecc-compiler for the vuecc command.

Usage:
Usage: vuecc input output [['reference']][-t type][-q|--quiet][-c|--no-colors]
[-n|--no-header][-h|--help|-v|--version]

 input              : Class-based component as input (e.g. component.vue.ts)
 output             : new Vue() formatted component as output (e.g. component.ts)
 ['reference']      : Reference path include(s) (TypeScript).
 -t | --type        : Specify language input (coffee, ts, js).
 -q | --quiet       : Be less verbose (only error output).
 -c | --no-colors   : Don't use colorful output.
 -n | --no-header   : Don't generate commented header for output.
 -h | --help        : Display this usage information and exit.
 -v | --version     : Display application version and exit.
Using Gulp or Grunt?

🍹 gulp-vuecc 🐗 grunt-vuecc

This utility should not be confused with https://github.com/vuejs/vue-component-compiler

Package Sidebar

Install

npm i vuecc-compiler

Weekly Downloads

19

Version

0.1.0

License

MIT

Last publish

Collaborators

  • stpettersens