1.0.0 • Published 5 years ago

fft-foundation v1.0.0

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
5 years ago

Install

Run the command below in your terminal to install FFTFoundation first

npm install @pdd/fft-foundation --registry=https://npm.shfft.cc

Usage

Global Use

Import in your entry script file and register it

import FFTFoundation from '@pdd/fft-foundation'

Vue.use(FFTFoundation)

Example

<fft-button>click</fft-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": "fft-foundation",
            "libDir": "lib",
            "styleLibrary": {
                "name": "styles",
                "base": false, // no base.css file
                "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 'fft-foundation'

Vue.component('fft-button', Button)
1.0.0

5 years ago