Svelte with Yumma CSS
Setting up Yumma CSS in a Svelte project.
Creating a new project
To create a new Svelte project, you need run the Svelte command in your terminal.
-
Install Yumma CSS
Install
yummacss
using a package manager.Installing dependencies... npm i yummacss -DInstalling dependencies... pnpm add yummacss -DInstalling dependencies... yarn add yummacss -D
-
Initialize configuration
Create a configuration file in your project.
Terminal npx yummacss initTerminal pnpx yummacss initTerminal yarn dlx yummacss init -
Set up configuration
Specify the locations of all your project files in the config file.
yumma.config.js export default {source: ["./src/**/*.svelte"],output: "./src/global.css",buildOptions: {reset: true,minify: false,}}; -
Build styles
You can now start generating your CSS with the
build
orwatch
command.Terminal npx yummacss buildTerminal pnpx yummacss buildTerminal yarn dlx yummacss build -
Done!
Youβre all set to start using Yumma CSS utility classes in your project.
routes/+page.svelte <h1 class="fs-sm fw-700 ta-c tc-indigo">Yumma CSS π€ Svelte</h1>
Clone this project
Skip the guide steps entirely with our Svelte starter.
git clone https://github.com/yumma-lib/with-svelte.git