@nakshora/postcss
v3.1.0
Published
Nakshora PostCSS plugin — @nakshora source / utilities with full JIT support
Maintainers
Readme
@nakshora/postcss
Nakshora for any PostCSS pipeline — webpack, Next.js, Laravel, Gulp,
esbuild, Rollup. Adds the @nakshora … at-rules so a plain .css file compiles
to utility-first CSS (full build or JIT).
Nakshora is a utility-first CSS framework with a JIT compiler and a Tailwind-compatible class grammar. On Vite, prefer @nakshora/vite-plugin (it wraps this plugin and adds a virtual module + HMR). No bundler at all? Use @nakshora/cli.
Install
npm install -D @nakshora/postcss postcsspostcss ^8.4 is a peer dependency.
Quick start
// postcss.config.js
module.exports = {
plugins: [
require('@nakshora/postcss')({
config: {
content: ['./src/**/*.{html,js,ts,jsx,tsx,blade.php}'],
safelist: ['lg:flex'],
},
}),
],
};/* src/nakshora.css */
@nakshora source;// main.js
import './src/nakshora.css';ESM config files work the same way:
// postcss.config.mjs
import nakshora from '@nakshora/postcss';
export default {
plugins: [nakshora({ content: ['./src/**/*.{html,js,ts,jsx,tsx}'] })],
};At-rules
| At-rule | Emits |
| ---------------------------------- | ---------------------------------------------------------------------------- |
| @nakshora source; | base + variables + keyframes + utilities + components (JIT when content set) |
| @nakshora base; | base layer only |
| @nakshora variables; (or vars) | :root CSS variables only |
| @nakshora keyframes; | all @keyframes |
| @nakshora utilities; | utilities (JIT when content is configured) |
| @nakshora components; | built-in design components (glass, neon, brutalist, minimalist, skeletons) |
Options
nakshora({
config: {/* full NakshoraConfig — theme, content, safelist, important, plugins… */},
content: ['./src/**/*.html'], // JIT content (globs or raw strings) — overrides config.content
minify: false, // minify the generated CSS
});Content globs resolve relative to the directory of the CSS file being
processed (or process.cwd() when the file is in-memory).
Documentation
License
MIT © Rizwan Rahim Chowdhury — nakshora/nakshora
