2016-07-04 4 views
0

"src"가없는 복사본을 축소 한 다음 만듭니다. 어떤 폴더 내의 모든 index.src.php 파일의 일부는 그래서 난 아직도이 index.src.php 가능하지만 복사 축소 된 index.php를 :동일한 디렉토리에있는 파일의 이름을 바꿉니다.

gulp.task('usemin', function() { 
    return gulp.src('./**/index.src.php') 
     .pipe(usemin({ 
      inlinecss: [ minifyCss, 'concat' ] 
     })) 
     .pipe(rename(function(path){ 
      path.basename = path.basename.replace('min\.', ''); 
     })) 
     .pipe(gulp.dest('.')); 
}); 

은 ... 지금까지 이것은 단지 말 그대로 index.src의 이름을 바꿉니다 ...

답변

0

꿀꺽 이름 바꾸기가 예상보다 쉬웠다 index.php에에에 .php

gulp.task('usemin', function() { 
    return gulp.src('./**/index.src.php') 
     .pipe(usemin({ 
      inlinecss: [ minifyCss, 'concat' ] 
     })) 
     .pipe(rename({ 
      basename: 'index' 
     })) 
     .pipe(gulp.dest('.')); 
}); 
관련 문제