0.0.2 ā€¢ Published 1 year ago

encanto v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

encanto

npm version npm downloads Github Actions Codecov

Build SFC-based component libraries with Vite

šŸš§ This library is work-in-progress. So please, file issues and suggestions! šŸš§

TODO

  • global + scoped styles
  • allow locally scoping all CSS
  • compile script setup -> vue 2.6 template (with composition api)

Installation

Install package:

# npm
npm install encanto

# yarn
yarn install encanto

# pnpm
pnpm install encanto

Usage

Add to your vite.config.ts:

import { defineConfig } from 'vite'
import Vue from '@vitejs/plugin-vue'

import { EncantoPlugin } from 'encanto'

export default defineConfig({
  build: {
    // encanto is designed for library mode: https://vitejs.dev/guide/build.html#library-mode
    lib: {
      // ...
    },
  },
  plugins: [Vue(), EncantoPlugin()],
})

šŸ’» Development

  • Clone this repository
  • Enable Corepack using corepack enable (use npm i -g corepack for Node.js < 16.10)
  • Install dependencies using pnpm install
  • Run interactive tests using pnpm dev

License

Made with ā¤ļø

Published under MIT License.