0
저는 이와 같은 디렉토리 구조를 가지고 있습니다.gulp clean이 올바른 방식으로 작동하지 않습니다.
dist
|--client
|--assets
|--images
|--bower_components
|--server
|--.bower.json
자산/이미지 폴더를 제외하고 dist 폴더를 정리하려고합니다.
그러나 dryRun 모드에서이 명령을 실행하면 자산/이미지 파일이 제거되지 않습니다. 그러나 비활성화 한 후에는 모든 파일과 폴더가 제거됩니다. 사용하는 정수의
gulp.task('clean:dist',() => {
del.sync([
`${paths.dist}/!(.git*|.openshift|Procfile)**`,
`${paths.dist}/client/**`,
`!${paths.dist}/client/assets`,
`!${paths.dist}/client/assets/**`], {
//dryRun: true
});
//console.log('dELETE FIELSE ARE: ' + JSON.stringify(value));
});
값은 다음
${paths.dist} ='dist';
완벽한 :
당신은 명시 적으로dist/client
디렉토리를 무시해야합니다. 감사 :) –