Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jiren/gulp-injector
Insert js, html etc using comment i.e /* inject my_module.js */
https://github.com/jiren/gulp-injector
Last synced: about 2 months ago
JSON representation
Insert js, html etc using comment i.e /* inject my_module.js */
- Host: GitHub
- URL: https://github.com/jiren/gulp-injector
- Owner: jiren
- License: mit
- Created: 2014-12-26T06:17:02.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-01-23T08:40:14.000Z (almost 10 years ago)
- Last Synced: 2024-10-13T03:11:53.196Z (3 months ago)
- Language: JavaScript
- Size: 168 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
#gulp-injector
>Inject files into code.> Made for gulp 3
## Usage
First, install `gulp-injector` as a dev dependency:
`npm install --save-dev gulp-injector`Inject files by adding comments `inject` and filename. In following example it will include `my_module.js`.
```
function somethingNew(){/* inject my_module.js */
}
````gulpfile.js`:
```javascript
var gulp = require('gulp'),
inject = require('gulp-injector'),gulp.task("scripts", function() {
gulp.src('src/js/main.js')
.pipe( inject() )
.pipe( gulp.dest("dist/js") )
});gulp.task("default", "scripts");
```## Licence
[MIT License](https://github.com/jiren/gulp-injector/blob/master/LICENSE.md)