Git Product home page Git Product logo

newbeea / universal-vue-component-template Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 0.0 181 KB

Building Universal Vue Libraries for Vue2 & Vue3. Using vue-demi but you don't need to write "render" function, "template" and "tsx" are supported!

Home Page: https://universal-vue-component-2.vercel.app

HTML 5.50% JavaScript 15.06% Vue 35.03% TypeScript 41.98% SCSS 2.43%
universal-components library vue2vue3 jsx tsx template

universal-vue-component-template's Introduction

Universal vue component template

  • Building Universal Vue Libraries for Vue 2 & 3
  • Using vue-demi but you don't need to write "render" function, "template" and "tsx" are supported!

Usage

Use this template or clone it

Install

yarn

Develop

yarn run dev

Build

yarn run build

Publish

Change package name, publish and install it to test in vue2/3

If you want to use 'npm link' project locally, you need to edit "package.module" "package.main" according to vue version.

// vue2
{
  "name": "your-component",
  "module": "./dist/vue2/index.es.js",
  "main": "./dist/vue2/index.umd.js",
  ...
  }
// vue3
{
  "name": "your-component",
  "module": "./dist/vue3/index.es.js",
  "main": "./dist/vue3/index.umd.js",
  ...
  }

Example

Install 'universal-vue-template' which built by this template in vue2 or vue3, it will work correctly.

yarn add universal-vue-template
import Universal from 'universal-vue-template'
import 'universal-vue-template/dist/style.css'

Vue2 example src preview

Vue3 example src preview

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.