1.0.1 • Published 2 years ago
nuxt-css-manager v1.0.1
nuxt-css-manager
A module that will help you managing your pages'styling in nuxt.
Features
⛰ minimal and lightweight
🚠 no dependencies (other than defu)
🌲 depends on Explicit module options so it prevents unwanted css applying
Quick Setup
Add
nuxt-css-nmanager
dependency to your project
# Using pnpm
pnpm add -D nuxt-css-nmanager
# Using yarn
yarn add --dev nuxt-css-nmanager
# Using npm
npm install --save-dev nuxt-css-nmanager
create a folder called
style
in thepublic
directory. name your css files as the page's folder you want to style. ie:`public/style --| user.css // this will style all the pages in the user pages folder --| product.css // this will style all the pages in the product pages folder`
- Add
nuxt-css-nmanager
to themodules
section ofnuxt.config.ts
, and add the folders that you want to apply the styling inside the module options :
export default defineNuxtConfig({
modules: [
'nuxt-css-nmanager'
],
autoCss: {
//the module will apply styling (from user.css) on all the pages inside the user folder
folders: ["user"]
},
})
That's it! You can now use css-nmanager
module in your Nuxt app ✨
Development
# Install dependencies
npm install
# Generate type stubs
npm run dev:prepare
# Develop with the playground
npm run dev
# Build the playground
npm run dev:build
# Run ESLint
npm run lint
# Run Vitest
npm run test
npm run test:watch
# Release new version
npm run release
1.0.1
2 years ago