Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ovh/rollup-plugin-less-inject
A Rollup plugin for injecting Less files as CSS into HTML document's head
https://github.com/ovh/rollup-plugin-less-inject
inject less plugin rollup
Last synced: 3 months ago
JSON representation
A Rollup plugin for injecting Less files as CSS into HTML document's head
- Host: GitHub
- URL: https://github.com/ovh/rollup-plugin-less-inject
- Owner: ovh
- License: bsd-3-clause
- Created: 2019-06-20T15:32:31.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-10-16T18:09:11.000Z (over 1 year ago)
- Last Synced: 2024-10-15T15:42:00.896Z (3 months ago)
- Topics: inject, less, plugin, rollup
- Language: JavaScript
- Homepage:
- Size: 931 KB
- Stars: 2
- Watchers: 25
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Codeowners: .github/CODEOWNERS
- Authors: AUTHORS
Awesome Lists containing this project
README
# rollup-plugin-less-inject
> A [Rollup](https://rollupjs.org/) plugin for injecting [Less](http://lesscss.org/) files as CSS into HTML document's head.
[![Downloads](https://badgen.net/npm/dt/@ovh-ux/rollup-plugin-less-inject)](https://npmjs.com/package/@ovh-ux/rollup-plugin-less-inject) [![Dependencies](https://badgen.net/david/dep/ovh/rollup-plugin-less-inject)](https://npmjs.com/package/@ovh-ux/rollup-plugin-less-inject?activeTab=dependencies) [![Dev Dependencies](https://badgen.net/david/dev/ovh/rollup-plugin-less-inject)](https://npmjs.com/package/@ovh-ux/rollup-plugin-less-inject?activeTab=dependencies)
## Install
```sh
$ yarn add -D @ovh-ux/rollup-plugin-less-inject
```## Usage
```js
// rollup.config.js
import lessInject from '@ovh-ux/rollup-plugin-less-inject';export default {
input: 'src/main.js',
output: {
file: 'dist/main.js',
format: 'cjs',
},
plugins: [
lessInject(),
],
};
```### Options
#### Include
+ Default: `[ '**/*.less', '**/*.css' ]`
+ Type: `String|Array`Minimatch pattern or array of minimatch patterns to determine which files will be transpiled by the plugin.
#### Exclude
+ Default: `node_modules/**`
+ Type: `String|Array`Minimatch pattern or array of minimatch patterns to determine which files won't be transpiled by the plugin, takes precedence over the `include` option.
#### Option
+ Type: `Object`
Options for [less](http://lesscss.org/usage/#programmatic-usage).
## Test
```sh
$ yarn test
```## Contributing
Always feel free to help out! Whether it's [filing bugs and feature requests](https://github.com/ovh/rollup-plugin-less-inject/issues/new) or working on some of the [open issues](https://github.com/ovh/rollup-plugin-less-inject/issues), our [contributing guide](CONTRIBUTING.md) will help get you started.
## License
[BSD-3-Clause](LICENSE) © OVH SAS