svelte-ui 0.0.12
Install from the command line:
Learn more about npm packages
$ npm install @significa/svelte-ui@0.0.12
Install via package.json:
"@significa/svelte-ui": "0.0.12"
About this version
This project is responsible for Significa's Svelte UI library. Storybook preview available at significa-svelte-ui.vercel.app.
This package is published in the GitHub package registry as @significa/significa-svelte-ui.
- Generate a new github PAT (Classic Personal Access Token).
Grant
read:packages
Download packages from GitHub Package Registry. - Open your shell configuration file (
.zshrc
,.bashrc
, etc.) and export your token at the end of the file:export GITHUB_ACCESS_TOKEN=access_token_here
More instructions in Working with the npm registry.
Install with npm install --save-dev @significa/svelte-ui
In your tailwind configuration file (tailwind.config.cjs
), import our tailwind preset and update the content
key to include our package.
Optionally (but ideally), you can include our brand fonts by providing a path to your project's static font files.
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./src/**/*.{html,js,svelte,ts}',
'./node_modules/@significa/svelte-ui/**/*.{html,js,svelte,ts}' // add this
],
presets: [
require('@significa/svelte-ui/tailwind-preset') // add this
],
theme: {
// your theme
}
};
If the project needs to include our brand fonts, you can call the preset defining custom fonts and their path:
module.exports = {
presets: [
require('@significa/svelte-ui/tailwind-preset')({
fonts: {
sans: {
name: 'Significa Sans',
fontFaces: [
{
fontWeight: '400',
src: `url('/fonts/significa-regular.woff2') format('woff2')`,
ascentOverride: '95%'
},
{
fontWeight: '500',
src: `url('/fonts/significa-medium.woff2') format('woff2')`,
ascentOverride: '95%'
},
{
fontWeight: '600',
src: `url('/fonts/significa-semibold.woff2') format('woff2')`,
ascentOverride: '95%'
}
]
}
}
})
]
};
- Ensure you are using the Node version in the .nvmrc file (ex:
nvm use
). - Install the dependencies with
npm install
. - Start Storybook's component preview server with
npm run storybook
. Access it athttp://localhost:6006/
.
Just create a new release with a semver compliant name, prefixed by v
. Ex: v1.2.3
, v1.2.3-sample
.