0.2.4 • Published 5 years ago

vue-classify v0.2.4

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

vue-classify

Build Status

Coverage Status Greenkeeper badge

Convert option-object style vue component to vue-class-component decorated class.

Inspired by vue-to-react.

Here is an online demo

Install

npm i -g vue-classify # or yarn global add vue-classify

Usage

Usage: vue-classify [options]

Options:
  -V, --version  output the version number
  -i, --input    the input path for vue component
  -o, --output   the output path for new component, which default value is process.cwd()
  -n, --name     the output file name, which default value is "classified.ts"
  -h, --help     output usage information

  Examples:

    # transform a vue option-object style component to class component.

    $ vue-classify ./components/option-object.js ./components/Component.ts
    $ vue-classify -i ./components/option-object.js -o ./components/ -n Component

Preview Screenshots

Convert props

demo-1

SFC

demo-2

Features

  • props/watch -> vue-property-decorator decorated class properties
  • computed -> class getter and setter
  • lifecycle hooks -> class methods
  • methods -> class methods
  • other options will be passed to @Component decorator
0.2.4

5 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago