Skip to content

Getting Started

Setup

This setup assumes your client app is created with Vite and vue-ts template, and you use 'npm link' to link to schoolkit-component-library locally.

In your package.json, you shall have the dependencies compatible with the following:

json
"dependencies": {
  // documentation still needed
}

In your vite.config.ts, you shall configure to dedupe vue:

ts
export default defineConfig({
  resolve: {
    dedupe: ['vue'],
  },
});

In your main.ts, you shall import the libraries and CSS:

ts
import '@schoolkit/components/styles';
import ComponentLibrary from '@schoolkit/components';

app.use(ComponentLibrary);

Import components from this library in your own component:

html
<script setup lang="ts">
  import { SkIcon, ... } from '@schoolkit/components';
</script>