ictu-component-library
v0.0.3
Published
This projects contains Vue components that can reused in other projects. The components are exposed as a Node package. The package include typescript declaration files.
Downloads
3
Readme
ictu-component-library
This projects contains Vue components that can reused in other projects. The components are exposed as a Node package. The package include typescript declaration files.
Usage
- Run
npm install
- Create components in
src/components
and import/export insrc/index.ts
- Create a build
npm run build
Now you can either (1) publish the package at NPM or (2) create a symlink for local testing.
Option 1: publish at NPM
- Login with
npm adduser
- Publish with
npm publish
. The package will be published with the version specified inpackage.json
- In the project where you want to import the package, run
npm install ictu-component-libary
.
Option 2: use locally via symlink
- Create a symbolink:
npm link
- In the project where you want the import the package, run
npm link ictu-component library
(the name refers to the name property inpackage.json
)
Regardless of the chosen option (NPM or symlink), you can now verify that it works by importing a component from the library:
import { IctuExample } from 'ictu-component-library'
You should now be able to use this component like any other Vue component. Notice that the component is typed: you will get TypeScript errors when the component props are not entered correctly.
To do
- Create a pipeline to publish a new version
- Investigate how to integrate CSS that is not defined in the component but in a seperate stylesheet.