Automatically convert those LESS file which is not using less function to CSS.

Related tags

CSS less-2-css
Overview

less-2-css

Automatically convert those .less file which is not using less function to .css.

Why

Less is a powerful CSS pre-processor, but it also very slow. We want use it only when we need it.

Usage

Directly use it without install it into your project:

$ pnpx @ken20001207/less-2-css ./src --write

Install as a devDependency and use it in your project:

$ pnpm i @ken20001207/less-2-css -D
$ pnpx less-2-css ./src --write

How it works

  1. Scan all files in the project.
  2. Once found a .less file, use postcss to convert it to css file.
  3. Validate the css file with csstree-validator.
  4. If it is valid, this file can be safely rename to .css.
  5. Modify the import path in .js, .jsx, .ts, .tsx file from .less to .css.

Example

You can see this example in /test/example.

Before

After

You might also like...

Chrome extension to automatically mute/unmute Spotify tab when Advertisement starts and ends!

Ad free spotify Chrome extension to automatically mute/unmute Spotify tab when there's an Advertisement starts or ends. How to install Download Zip fi

Dec 25, 2022

Install the latest artifacts automatically and launch your server in a production ready mode with accessible convars.

Setup Edit the first three lines of the index.ts file to set your custom folder layout, follow the folder structure below for a example. const server_

Feb 4, 2022

Spectre.css - A Lightweight, Responsive and Modern CSS Framework

Spectre.css Spectre.css is a lightweight, responsive and modern CSS framework. Lightweight (~10KB gzipped) starting point for your projects Flexbox-ba

Jan 8, 2023

Low-level CSS Toolkit – the original Functional/Utility/Atomic CSS library

Basscss Low-level CSS toolkit – the original Functional CSS library https://basscss.com Lightning-Fast Modular CSS with No Side Effects Basscss is a l

Dec 31, 2022

Framework-agnostic CSS-in-JS with support for server-side rendering, browser prefixing, and minimum CSS generation

Aphrodite Framework-agnostic CSS-in-JS with support for server-side rendering, browser prefixing, and minimum CSS generation. Support for colocating y

Jan 1, 2023

CSS Boilerplate / Starter Kit: Collection of best-practice CSS selectors

Natural Selection Natural Selection is a CSS framework without any styling at all. It is just a collection of selectors that can be used to define glo

Dec 8, 2022

Cooltipz.css - A highly customisable, minimal, pure CSS tooltip library

Cooltipz.css - A highly customisable, minimal, pure CSS tooltip library

Cooltipz.css - Cool tooltips Cool customisable tooltips made from pure CSS Lightweight • Accessible • Customisable • Simple Cooltipz.css is a pure CSS

Dec 24, 2022

micro-library for CSS Flexbox and CSS Grid

SpeedGrid micro-library for CSS Flexbox and CSS Grid Overview SpeedGrid dynamically generates inline CSS by specifying the class name. Easy maintenanc

Mar 26, 2022

Data-tip.css - Wow, such tooltip, with pure css!

Notice: hint.css has been much better since I complained about it months ago, so try out its new features instead of this one! data-tip.css Wow, such

May 26, 2021
Owner
UmiJS
Extensible enterprise-level front-end application framework.
UmiJS
This project is for those who are new to open-source and looking for make their first contribution

First Contribution This project is for those who are new to open-source and looking for make their first contribution. Follow the steps below :- If yo

Heritage Institute of Technology 2025 122 Jan 4, 2023
Convert css (scss/sass) to vanilla-extract.

CSS-to-vanilla-extract ⚡ Welcome ?? Convert CSS (SCSS/SASS) to vanilla-extract. playground Install npm i -D c2ve Usage Once installed, you can run it

j1ngzoue 31 Jan 4, 2023
The Less Formal CSS Framework

PaperCSS The less formal CSS framework, with a quick and easy integration. Table of contents Table of contents Quick-start Status Content of the frame

PaperCSS 3.8k Jan 4, 2023
Easily create css variables without the need for a css file!

Tailwind CSS Variables This plugin allows you to configure CSS variables in the tailwind.config.js Similar to the tailwindcss configurations you are u

Mert Aşan 111 Dec 22, 2022
Automatic GatsbyJS App Landing Page - Automatically generate iOS app landing page using GatsbyJS

Automatic GatsbyJS App Landing Page Create and deploy an iOS app landing page on GitHub Pages and Netlify in a couple of minutes ?? Fork this repo ??

Imed Adel 173 Jan 1, 2023
Reseter.css - A Futuristic CSS Reset / CSS Normalizer

Reseter.css A CSS Reset/Normalizer Reseter.css is an awesome CSS reset for a website. It is a great tool for any web designer. Reseter.css resets all

Krish Dev DB 1.1k Jan 2, 2023
A URL shortener website and PWA build with vercel serverless cloud function, MongoDB and nodeJS

❤️ lenk.cf A URL shortner made using NodeJS, MongoDB and Vercel serverless function. This project also includes a serverless API. With the help of thi

Adithya Pai B 12 Nov 5, 2022
JSS is an authoring tool for CSS which uses JavaScript as a host language.

JSS A lib for generating Style Sheets with JavaScript. For documentation see our docs. Backers Support us with a monthly donation and help us continue

JSS 6.9k Dec 31, 2022
Automatically generate a style guide from your stylesheets.

StyleDocco StyleDocco generates documentation and style guide documents from your stylesheets. Stylesheet comments will be parsed through Markdown and

Jacob Rask 1.1k Sep 24, 2022