-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enable copying images from npm packages (#30)
* enable copying images from npm packages * allow .ico, .jpg and .gif images * allow .ico, .jpg and .gif images * allow .svg images
- Loading branch information
1 parent
8c2f65c
commit 7abe8af
Showing
4 changed files
with
39 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
'use strict'; | ||
|
||
const gulp = require('gulp'); | ||
const flatten = require('gulp-flatten'); | ||
const config = require('../config.js'); | ||
|
||
let buildParams = config.buildParams; | ||
|
||
gulp.task('watch-img', () => { | ||
gulp.watch([buildParams.viewImgDir(), '!'+buildParams.customNpmImgPath()],['custom-img']); | ||
}); | ||
|
||
gulp.task('custom-img', () => { | ||
return gulp.src(buildParams.customNpmImgPath()) | ||
.pipe(flatten()) | ||
.pipe(gulp.dest(buildParams.viewImgDir())); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters