gulp


TypeError: glob pattern string required


I'm trying to compile sass using gulp-ruby-sass but I'm getting TypeError: glob pattern string required.
This is what my gulpfile.js looks like:
var gulp = require('gulp'),
sass = require('gulp-ruby-sass');
var paths = {
sassSrcPath: ['Content/css/**/*.scss'],
sassDestPath: ['build/css/'],
sassImportsPath: ['Content/styleguide/']
};
// Styles Task
gulp.task('styles', function () {
gulp.src(paths.sassSrcPath)
.pipe(sass({
style: 'compressed',
loadPath: [paths.sassImportsPath]
}))
.pipe(gulp.dest(paths.sassDestPath));
});
// Watch Task
gulp.task('watch', function () {
gulp.watch(paths.sassSrcPath, ['styles']);
});
gulp.task('default', ['styles', 'watch']);
Here is my folder structure:
├── Content
│ ├── css
│ │ ├── partials
│ │ │ └─_icons.scss
│ │ ├── main.css.scss
│ │ └── styleguide.css.scss
│ └── styleguide
│ ├── css
│ │ └─ vendor
│ │ └─ // Bunch of other folders that contain .sass files
│ └── // Other .sass files
└── gulpfile.js
I'm fresh new to Gulp and I haven't used Grunt either so excuse me if I made a trivial mistake.
Looking at the docs, it doesn't seem like you're supposed to pipe into gulp-ruby-sass, but rather call it directly like that :
gulp.task('styles', function () {
return sass(paths.sassSrcPath, {
style: 'compressed',
loadPath: [paths.sassImportsPath]
})
.pipe(gulp.dest(paths.sassDestPath));
});

Related Links

Gulp.js. Same task on watch, with different parallel tasks
Split css for different devices
Gulpfile not working when module.exports references a Gulp task not a function?
Use gulp to process bowser files
Getting an error when trying to serve the app using browser-sync
Can't Sprite using gulp.spritesmith
How can I make build variables available to all JS files in gulp?
Gulp not installed globally?
gulp-useref deep folders error
use gulp+browserify+reactify, can't emit exit when got a ReactifyError
gulp-browserstack and gulp-cucumber don't seem to play nicely together
Gulp - Babel - EcmaScript-6 - Redux / Unhandled stream error in pipe
Delete all files using gulp except once that match pattern
Gulp task 'inject:vendor' does not inject Bower dependencies
Why do you open a gulp src pipe when you use gulp-watch?
Atom action performed on save

Categories

HOME
c#
actionscript-3
max
stanford-nlp
ide
compression
cluster-analysis
packet
weblogic
window.open
liquibase
azure-resource-manager
query-string
psexec
docker-compose
jquery-select2
browserstack
virtualhost
obd-ii
angularjs-ng-repeat
ios-universal-links
core-data
captcha
dat.gui
game-engine
android-navigation-drawer
multipart
mattermost
beaker-notebook
opengraph
fastboot
handle
scrapy-spider
rancher
android-cursorloader
setup-project
delphi-2010
paper-trail-gem
edsdk
wordpress-rest-api
tikz
storefront
luhn
angularjs-resource
ragel
kofax
scalamock
lfe
keychain
collation
libzip
angular-fullstack
audio-fingerprinting
visualizer
rmq
mate-desktop
jigsaw
patching
treelist
android-progressbar
stdlist
skscene
syncano
qf-test
os.walk
conditional-comments
android-relativelayout
pidgin
sqldatasource
acrofields
windows-phone-store
nativequery
adabas
lastinsertid
maven-javadoc-plugin
caroufredsel
xrandr
outlook-object-model
cocotron
reference-manual
system.transactions
ntdll
linear-interpolation
motordriver
winrt-async
erlide
diazo
sqlbuddy
unordered-set
umfpack
recess
noise-reduction
pixel-bender
httpbrowsercapabilities

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App