1.0.1 • Published 2 years ago

nuxt-css-manager v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

nuxt-css-manager

npm version

npm downloads

License

Nuxt

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

  1. 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
  1. create a folder called style in the public 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`
  1. Add nuxt-css-nmanager to the modules section of nuxt.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-nmanagermodule 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