stylelintの記述をgulp.jsから外すとうまくいくのですが、stylelintの記述を入れるとError: No configuration foundとエラーが出ます。
どなたか理由がわかりませんでしょうか?
stylelintの記述を外すとうまくいきます。
・stylelintインストール時
C:\Users\user\Desktop\images\gulp-folder\postcss>npm install --save-dev npm install stylelint npm WARN prefer global npm@3.9.6 should be installed with -g npm WARN prefer global colorguard@1.2.0 should be installed with -g postcss@1.0.0 C:\Users\user\Desktop\images\gulp-folder\postcss +-- install@0.8.1 +-- npm@3.9.6 | +-- abbrev@1.0.7 | +-- ansi-regex@2.0.0 | +-- ansicolors@0.3.2 | +-- ansistyles@0.1.3 | +-- aproba@1.0.3 | +-- archy@1.0.0 | +-- chownr@1.0.1 | +-- cmd-shim@2.0.2 | +-- columnify@1.5.4 | | `-- wcwidth@1.0.0 | | `-- defaults@1.0.3 | | `-- clone@1.0.2 | +-- config-chain@1.1.10 | | `-- proto-list@1.2.4 | +-- debuglog@1.0.1 | +-- dezalgo@1.0.3 | | `-- asap@2.0.3 | +-- editor@1.0.0 | +-- fs-vacuum@1.2.9 | +-- fs-write-stream-atomic@1.0.8 | +-- fstream@1.0.8 | +-- fstream-npm@1.1.0 | | `-- fstream-ignore@1.0.5 | | `-- minimatch@3.0.0 | | `-- brace-expansion@1.1.4 | | +-- balanced-match@0.4.1 | | `-- concat-map@0.0.1 ~ npm WARN postcss@1.0.0 No description npm WARN postcss@1.0.0 No repository field.
・トランスパイル時
C:\Users\user\Desktop\images\gulp-folder\postcss>gulp css (node:4856) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version. [13:20:27] Using gulpfile ~\Desktop\images\gulp-folder\postcss\gulpfile.js [13:20:27] Starting 'css'... events.js:160 throw er; // Unhandled 'error' event ^ Error: No configuration found at exports.default (C:\Users\user\Desktop\images\gulp-folder\postcss\node_modules\stylelint\dist\utils\configurationError.js:8:13) at C:\Users\user\Desktop\images\gulp-folder\postcss\node_modules\stylelint\dist\buildConfig.js:43:54
・gulpfile.js
//gulpfile.js var gulp = require('gulp'); //gulpをインポート var postcss = require('gulp-postcss'); //gulp-postcssをインポート var cssnext = require('postcss-cssnext'); //cssnextをインポート var nested = require('postcss-nested'); var stylelint = require('stylelint'); gulp.task('css', function () { //”css”タスクを登録 var plugins = [ cssnext, //一旦空の配列を作成 nested, stylelint ]; return gulp.src('./src-before/*.css') //src-before下にある.cssファイルを指定 .pipe(postcss(plugins)) //PostCSSにファイルを処理してもらう .pipe(gulp.dest('./dest-after')); //生成されたCSSをdest-after下に配置 });
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。