Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iam-medvedev/esbuild-plugin-less
esbuild plugin for less files
https://github.com/iam-medvedev/esbuild-plugin-less
esbuild less plugin
Last synced: 6 days ago
JSON representation
esbuild plugin for less files
- Host: GitHub
- URL: https://github.com/iam-medvedev/esbuild-plugin-less
- Owner: iam-medvedev
- License: wtfpl
- Created: 2021-01-20T06:44:02.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-03T19:06:23.000Z (about 1 month ago)
- Last Synced: 2024-10-15T04:12:09.444Z (24 days ago)
- Topics: esbuild, less, plugin
- Language: TypeScript
- Homepage: https://npmjs.com/package/esbuild-plugin-less
- Size: 6.66 MB
- Stars: 42
- Watchers: 3
- Forks: 12
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-esbuild - esbuild-plugin-less
README
[![License: WTFPL](https://img.shields.io/badge/License-WTFPL-brightgreen.svg)](http://www.wtfpl.net/about/)
[![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg)](http://www.typescriptlang.org/)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-f8bc45.svg)](https://github.com/prettier/prettier)
[![npm version](https://badge.fury.io/js/esbuild-plugin-less.svg)](https://www.npmjs.com/package/esbuild-plugin-less)
[![npm version](https://img.shields.io/npm/dt/esbuild-plugin-less.svg)](https://www.npmjs.com/package/esbuild-plugin-less)
[![libraries.io](https://img.shields.io/librariesio/release/npm/esbuild-plugin-less)](https://libraries.io/github/iam-medvedev/esbuild-plugin-less)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fiam-medvedev%2Fesbuild-plugin-less.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fiam-medvedev%2Fesbuild-plugin-less?ref=badge_shield)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)# esbuild-plugin-less
[esbuild](https://github.com/evanw/esbuild) plugin for less files.
## Installation
```sh
yarn add esbuild-plugin-less -D
```## Usage
You can see the example [here](./example).
```ts
import { build } from 'esbuild';
import { lessLoader } from 'esbuild-plugin-less';build({
entryPoints: [path.resolve(__dirname, 'index.ts')],
bundle: true,
outdir: path.resolve(__dirname, 'output'),
plugins: [lessLoader()], // Just plug in
loader: {
'.ts': 'ts',
},
});
```## Configuration
```ts
lessLoader(lessOptions: Less.Options = {}, loaderOptions: LoaderOptions = {})
```- `options` — Accepts all valid options from less.js. You can find a complete list of options [here](http://lesscss.org/usage/#less-options).
- `loaderOptions` — Options for the loader. Supports custom esbuild [filter](https://esbuild.github.io/plugins/#filters).## License
`esbuild-plugin-less` is [WTFPL licensed](./LICENSE).
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fiam-medvedev%2Fesbuild-plugin-less.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fiam-medvedev%2Fesbuild-plugin-less?ref=badge_large)