New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

vuecc

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vuecc

A simple compiler for Vue Single File Components

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

VUE.js Component Compiler

Is a simple compiler for Vue.js Single File Components. I love this framework because of its simplicity. I also love the fact that it only needs a single script tag to start hacking!

I wanted to use SFC, but the only solutions to compile those files was through Babel. I don't want to install 200MB of deps on my laptop. I don't want to use Webpack or Browserify. I don't want to write 500+ SLOC configuration files. I don't need ES6, ES2015, TypeScript, ... I want to be able to read the generated file, and I don't need any optimizations I do not decide to include.

This comment on Reddit is a good explanation of what I wanted to achieve.

Getting started

The tool is really basic and do not support a bunch of things. Styles (scoped or not) will not be copied at this moment.

# install the cli
npm install -g vuecc
# just compile your files to javascript
vuecc component-1.vue component-2.vue > components.js

Example

Simple Vue file foo.vue:

<template>
  <div class="container">
    <p class="hello">{{foo.text}}</p>
  </div>
</template>

<script>
module.exports = {
  props: ['foo']
}
</script>

Compile to something as simple as this:

Vue.component("foo", {
  template: '<div class="container"><p class="hello">{{foo.text}}</p></div>',
  props: [ "foo" ]
});

Keywords

vuejs

FAQs

Package last updated on 23 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts