LoginSignup
1
1

More than 5 years have passed since last update.

gulpでstylusを使った時に先頭にアンダーバーがついていても出力されてしまう

Last updated at Posted at 2015-02-03

先頭に「_」がついているのに出力される

gulp-stylusで先頭にアンダーバーが付いているファイルに関しては出力されないはずなのに、実際に実行したら先頭にアンダーバーが付いているのにも関わらず出力されてしまった。基本的にstyle.stylというファイルに全部importしてcssファイルに変換したいので、どうにか出力されないようにしたい。

解決方法

「!」をつける

gulpfile.coffee
gulp.task'stylus', ->
  gulp.src(['./path/to/stylus/**/*.styl','!./path/to/stylus/**/_*.styl'])

みたいに書いてやれば出力されなくなった。
結構ハマってしまったので忘れないようにメモ。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1