diff --git a/packages/nuejs.org/docs/command-line-interface.md b/packages/nuejs.org/docs/command-line-interface.md index d28a9fb8..cf3cbcdc 100644 --- a/packages/nuejs.org/docs/command-line-interface.md +++ b/packages/nuejs.org/docs/command-line-interface.md @@ -40,6 +40,8 @@ Usage - **-b or --esbuild**: Uses esbuild as the bundler for your assets. Note that you need to install esbuild manually for this to work. +- **-l or --lcss**: Uses lightningcss as the minifier for your CSS. Note that you need to install lightningcss manually for this to work. + - **-P or --port**: Sets the port number to serve the site on. This is particularly useful if the default port (`8080`) is already in use. ### File Matches diff --git a/packages/nuejs.org/docs/settings.md b/packages/nuejs.org/docs/settings.md index 5d373686..7b1102dd 100644 --- a/packages/nuejs.org/docs/settings.md +++ b/packages/nuejs.org/docs/settings.md @@ -41,12 +41,14 @@ links: soc: //en.wikipedia.org/wiki/Separation_of_concerns ``` -### lightning_css +### minify_css -This setting controls the processing of CSS by [Lightning CSS](//lightningcss.dev/), a tool that optimizes CSS for better performance. By default, this feature is enabled (`true`), which means that CSS will be processed for improvements. Setting this to `false` disables the default processing, and the CSS is served directly as is, which may be useful for debugging or specific use cases where processing is not desired. +This setting controls the processing of CSS by Bun or [Lightning CSS](//lightningcss.dev/), which optimize CSS for better performance. By default, this feature is enabled (`true`), which means that CSS will be processed for improvements. Setting this to `false` disables the default processing, and the CSS is served directly as is, which may be useful for debugging or specific use cases where processing is not desired. ### native_css_nesting +Currently only available with Lightning CSS (`--lcss` option). + Determines whether to use native CSS nesting instead of converting them to un-nested style rules that are supported in all browsers. Native CSS nesting allows you to write more intuitive and organized CSS by nesting styles. Setting this to `true` generates a smaller CSS output, which can enhance performance, but it may not be supported by older browsers. Always check the current [Can I Use](//caniuse.com/css-nesting) statistics for details on browser compatibility. ### port diff --git a/packages/nuekit/src/nuekit.js b/packages/nuekit/src/nuekit.js index 503d67b0..279436c7 100644 --- a/packages/nuekit/src/nuekit.js +++ b/packages/nuekit/src/nuekit.js @@ -176,7 +176,7 @@ export async function createKit(args) { async function processCSS({ path, base, dir}) { const data = await site.getData() - const css = data.lightning_css === false ? + const css = data.minify_css === false ? await read(path) : await buildCSS(join(root, path), is_prod, data, lcss) await write(css, dir, base)