@bienbien/css-setup
v1.0.2
Published
A utility to set up PostCSS and styles for SvelteKit projects
Maintainers
Readme
@bien-bien/css-setup
A command-line utility to quickly set up PostCSS and styles for SvelteKit projects.
What it does
This utility performs the following tasks:
Creates the necessary CSS files:
src/lib/styles/main.css- Main CSS stylessrc/lib/styles/mixins/index.css- CSS mixins
Installs required packages:
postcss-mixins(dev dependency)autoprefixer(dev dependency)@bien-bien/css-sizes(regular dependency)@bien-bien/css-reset(regular dependency)
Creates a PostCSS configuration file (
postcss.config.cjs)Updates
svelte.config.jsto enable PostCSS by addingpostcss: trueto thevitePreprocessoptions
Installation
Global Installation
pnpm add -g @bien-bien/css-setupUsage
Navigate to your SvelteKit project directory and run:
css-setupAfter running the utility, remember to import the styles in your +layout.svelte file:
<script>
import '$lib/styles/main.css';
</script>