Before using the project with Gulp-htmlone to do the final JS and CSS inline packaging with a variety of problems
This time, I actually met the problem of wrapping the CSS slash to reverse the slash.
As follows:/src/common/images/i_banner.jpg will be changed to \src\common\images\i_banner.jpg
Really can not endure to change his source, changed after the other partners also to change, so decisively abandoned the pit
Found Gulp-inline on the internet to replace it.
function () { gulp.src (['./pages/**/*.html ']) . Pipe (Inline ({ js:uglify, css:cssmin, Disabledtypes: [///}]) . Pipe (Gulp.dest ('./dest ')) ;
The official API is as follows:
Https://www.npmjs.com/package/gulp-inline
Plugin options:
- Base-the root directory containing the files to be inlined
- Css-css transform (Gulp plugin)
- Js-js transform (Gulp plugin)
- Svg-svg transform (Gulp plugin)
- Ignore-array of file paths to ignore and not-inline (file paths as they appear in the source)
- Disabledtypes-array of types not to run inlining operations on (CSS, SVG, JS, img)
Gulp-htmlone Bug Abandoned pit