Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alik0211/gulp-inject-css
Gulp plugin for inject css file to html
https://github.com/alik0211/gulp-inject-css
css gulp html inject styles
Last synced: about 1 month ago
JSON representation
Gulp plugin for inject css file to html
- Host: GitHub
- URL: https://github.com/alik0211/gulp-inject-css
- Owner: alik0211
- License: mit
- Created: 2017-08-21T14:46:35.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-06-12T11:17:02.000Z (over 3 years ago)
- Last Synced: 2024-10-11T18:50:49.581Z (2 months ago)
- Topics: css, gulp, html, inject, styles
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/gulp-inject-css
- Size: 125 KB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-inject-css
[![GitHub Actions](https://img.shields.io/github/workflow/status/alik0211/gulp-inject-css/Unit%20tests/master?style=flat-square)](https://github.com/alik0211/gulp-inject-css/actions?query=branch%3Amaster)
[![Dependency Status](https://img.shields.io/david/alik0211/gulp-inject-css.svg?label=deps&style=flat-square)](https://david-dm.org/alik0211/gulp-inject-css)
[![devDependency Status](https://img.shields.io/david/dev/alik0211/gulp-inject-css.svg?label=devDeps&style=flat-square)](https://david-dm.org/alik0211/gulp-inject-css?type=dev)Inject css file to html
## Install
```shell
npm install gulp-inject-css --save-dev
```## Usage
```javascript
const gulp = require('gulp');
const injectCSS = require('gulp-inject-css');gulp.task('inject-css', function() {
gulp.src('src/*.html')
.pipe(injectCSS())
.pipe(gulp.dest('dist'));
});
```In the html file, specify the **relative** path to css
```html
...
...```