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 “watch” is not running the sub task “sass” on file change
Proxy URL not working with BrowserSync Gulp task
the task can't be called by watch module.
I can't get the data-uri() function to work on gulp.js to base64 an image on mac
How to inject bower dependencies in karma.conf.js file with gulp?
Getting Libsass Gulp Susy to work together
Gulp compass without config.rb
gulp-webserver: Default to index.html if available, else show directories
gulp-uglify notify on failing build
Declaring optional dependencies
gulp html minification error
Can an IIFE be added to a browserify bundle?
Gulp: Error Messages and Notifications with Plumber
Gulp - gulp-load-plugins not working
How to configure Gulp task to copy bower resources
gulp-jscs doesn't output anything when used in gulp-watch pipeline

Categories

HOME
airflow
youtube-api
marie
ftp
ssh
c++builder
magento-1.9.2.1
overrides
opengl-es
terminal
kohana
virtualhost
android-webview
osx-yosemite
webpack-dev-server
activejdbc
osrm
resharper
chef-recipe
android-notifications
javascript-debugger
github-flavored-markdown
ibatis
project-reactor
accordion
glibc
custom-component
fibonacci
onclicklistener
android-xml
proof-general
angular-schema-form
intermec
boost-log
choco
offset
cocoa-scripting
pyenv
kepserverex
mongoid5
const
mediastream
redbean
file-descriptor
jquery-ui-slider
gradlew
taleo
azure-data-catalog
automapper-4
easyquery
skype-bots
jcs
rmq
esprima
vertex-shader
altova
netlink
vga
archiva
cexception
trendline
angular-promise
borland-c++
euro
data-representation
firebase-tools
crystal-reports-7
nsurlrequest
nest-initiative
satisfiability
nvcc
logo-lang
jfilechooser
aspnet-compiler
kohana-orm
playing-cards
msbuild-task
spawn
system.transactions
linqdatasource
cryptarithmetic-puzzle
big-endian
django-1.4
mcpd
recess
nbehave
hs-err
jquery-attributes
for-xml
newspeak
calendarextender
ihtmldocument2

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