gulp-css-rebase
Advanced tools
Comparing version 2.0.0 to 2.0.1
14
index.js
@@ -15,3 +15,4 @@ 'use strict'; | ||
var options = merge({ | ||
output: null, | ||
output_assets: null, | ||
output_css: null, | ||
exclude: [], | ||
@@ -54,9 +55,9 @@ overwrite: false | ||
var newPath = !IsExclude | ||
? path.normalize(path.join(options.output, assetFolder, path.basename(assetPath))) | ||
: path.normalize(assetPath) | ||
; | ||
? path.normalize(path.join(options.output_assets, assetFolder, path.basename(assetPath))) | ||
: path.normalize(assetPath) | ||
; | ||
if ( | ||
(!IsExclude && !fileExists(newPath)) | ||
|| | ||
|| | ||
(!IsExclude && options.overwrite) | ||
@@ -77,3 +78,4 @@ ) { | ||
url = path.relative(options.output, newPath); | ||
url = path.relative(options.output_css, newPath); | ||
console.log(url); | ||
} | ||
@@ -80,0 +82,0 @@ |
{ | ||
"name": "gulp-css-rebase", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Rewrite url references in CSS and copyed CSS assets", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -18,2 +18,3 @@ # gulp-css-rebase | ||
var outputPath = 'dest'; | ||
var outputAssets = 'static'; | ||
@@ -23,3 +24,4 @@ gulp.task('default', () => | ||
.pipe(rebase({ | ||
output: outputPath, | ||
output_css: outputPath, | ||
output_assets: outputAssets, | ||
exclude: [ | ||
@@ -35,4 +37,5 @@ 'path/to/web/dir' | ||
### Options | ||
- `output` - The target directory for the processed CSS. Paths are rewritten relatively to that directory. | ||
- `output_css` - The target directory for the processed CSS. Paths are rewritten relatively to that directory. | ||
- `output_assets` - The target directory for CSS assets. | ||
- `exclude` - Paths are rewritten relatively to original path. | ||
- `overwrite` - Overwrite files |
4499
69
39