1.0.3 • Published 3 years ago

cele-ui v1.0.3

Weekly downloads
172
License
ISC
Repository
-
Last release
3 years ago

Run the command below in your terminal to install celeUI first

npm install cele-ui --save

Usage

Global Use

Import in your entry script file and register it

import CeleUI from 'cele-ui'
import "cele-ui/lib/styles/cele-ui.css"

Vue.use(CeleUI)

Example

<c-button>click</c-button>

On-demand Loading

Firstly, you should install babel-plugin-component in your project.

npm install babel-plugin-component

Configure your .babelrc file like this

{
    "plugins": [
        ["component", {
            "libraryName": "cele-ui",
            "libDir": "lib",
            "styleLibrary": {
                "name": "styles",
                "base": false, 
                "path": "[module].css"
            }
        }]
    ]
}

The you can import component on demand, and you don't need to care about importing styles, the babel plugin will do it automaticly.

import Vue from 'vue'
import { Button } from 'cele-ui'

Vue.component('c-button', Button)