svelte-element-ui
TypeScript icon, indicating that this package has built-in type declarations

1.1.7 • Public • Published

npm-publish

What is svelte-element-ui?

svelte-element-ui is a element-ui component library base on Svelte.

Install

  1. Install from npm.
npm install svelte-element-ui
  1. import the css in svelte file.
<script lang="ts">
  import 'svelte-element-ui/lib/seu.css'
  import { SeuAside, SeuButton } from 'svelte-element-ui'
</script>

<SeuAside />
<SeuButton>123</SeuButton>

To enable the style effective, rollup-plugin-css-only is needed to add in the rollup.config.js as a plugin.

import css from 'rollup-plugin-css-only';

export default {
  ...
  plugins: [
    ...
      css({ output: 'bundle.css' }),
    ...
  ]
  ...
}
  1. Copy the font files by using the rollup-plugin-copy in the rollup.config.js as a plugin
import copy from 'rollup-plugin-copy'

export default {
  ...
  plugins: [
    ...
    copy({
      targets: [
        {
          src: [
            'node_modules/svelte-element-ui/lib/fonts/element-icons.ttf',
            'node_modules/svelte-element-ui/lib/fonts/element-icons.woff',
          ],
          dest: 'public/build/fonts/',
        },
      ],
    }),
    ...
  ]
  ...
}

Development

Running Tests

npm run test

License

MIT

Package Sidebar

Install

npm i svelte-element-ui@1.1.7

Version

1.1.7

License

MIT

Unpacked Size

1.35 MB

Total Files

597

Last publish

Collaborators

  • koory1st