gulp.src関数は32個のファイルを返しますが、sass()からは1個のファイルしか返されません。Gulp、Sass処理 - 1ファイルで終了
私はgulpが新しく、32個のファイルすべてがsass()関数にパイプされない理由、または1つのファイルだけが処理されてsass()によって返される理由を指摘できると考えていました。
gulp.src(folderFound.path + "/*.scss")// 32個のファイルが出力ログ示さ
以下.pipe(SASS())//のみ1つのファイルは(SASSから返された)へ.css
/* File: gulpfile.js */
// grab our gulp packages
var gulp = require('gulp');
var gutil = require('gulp-util');
var path = require('path');
var concat = require('gulp-concat');
var recursiveFolder = require('gulp-recursive-folder');
var options = {
pathToFolder: './sass/',
readFolder: './sass/',
target: './Compiled'
}
var gulp = require('gulp');
var sass = require('gulp-sass');
gulp.task('generateTree', recursiveFolder({
base: options.pathToFolder,
exclude: [ // exclude the debug modules from thus build
'debug-modules'
]
}, function(folderFound){
return gulp.src(folderFound.path + "/*.scss")
.on("data", function(test) {
gutil.log("Found Files: ", test.path);
})
.pipe(
sass().on('error',
function(test) {
gutil.log("error: ", test.path);
})
)
.on("data", function(test) {
gutil.log("SASS Processed: ", test.path);
})
.pipe(gulp.dest('./css'));
;
}));
[16:18:40] Using gulpfile d:\Materialize\materialize-src\gulpfile.js
[16:18:40] Starting 'generateTree'...
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\materialize.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_buttons.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\date_picker\_default.date.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\forms\_checkboxes.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_cards.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\date_picker\_default.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\forms\_file-input.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_carousel.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\date_picker\_default.time.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\forms\_forms.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_chips.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\forms\_input-fields.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_collapsible.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\forms\_radio-buttons.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_color.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\forms\_range.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_dropdown.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\forms\_select.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_global.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\forms\_switches.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_grid.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_icons-material-design.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_materialbox.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_mixins.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_modal.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_navbar.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_normalize.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_prefixer.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_preloader.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_roboto.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_sideNav.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_slider.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_table_of_contents.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_tabs.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_toast.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_tooltip.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_typography.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_variables.scss
[16:18:40] Found Files: d:\Materialize\materialize-src\sass\components\_waves.scss
**[16:18:40] SASS Processed: d:\Materialize\materialize-src\sass\materialize.css**
[16:18:40] Finished 'generateTree' after 162 ms
これは、出力される単一の.cssファイルのファイルサイズが大きいことを説明します。どうもありがとうございました。 – Watson