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

Inserting specific file at index of a stream
How to pass array from gulp to other js files?
BrowserSync + Gulp with Vagrant not refreshing
gulp-tslint return undefined when required
Gulp watch only runs once
Gulp watch not working with imported files but works with main file
Gulp watch for css doesn't work
Using gulp for compiling of changed files only
How to run gulp task in visual studio code?
BrowserSync with custom URL
Multi-tenancy and Semantic UI
Display total number of errors with Gulp Jshint
Gulp watch entire folder & compile saved file
elixir.queueTask is undefined
gulp : browserify then concat files
parse error on vinyl source stream on gulp browserify babelify project

Categories

HOME
autohotkey
internet-explorer
primefaces
process
liquibase
ebay-api
highmaps
conceptual
spotfire
hex
artifactory
css-selectors
psexec
pyodbc
cracking
eclipse-orion
k-means
openscad
template10
geography
orange
civicrm
spring-webflow
sonarlint
inline-assembly
ppp
orgchart
restangular
xlib
arp
foxpro
ios-autolayout
storefront
pymunk
campaign-monitor
stencyl
pygraphviz
scalamock
linkurious
directadmin
compiler-warnings
flume-ng
php-mongodb
android-doze-and-standby
serverless-architecture
audio-fingerprinting
visualizer
gige-sdk
liferay-ide
reloaddata
petapoco
computed-properties
alfred
rowname
magick.net
csc
sprockets
mrunit
audiorecord
pushwoosh
genome
maven-archetype
beagleboard
jsonschema2pojo
gnip
time-frequency
triplestore
nspopupbutton
behance-api
iwork
pthreads-win32
data-layers
static-class
boost.build
antixsslibrary
cryptarithmetic-puzzle
states
bindinglist
joomla1.7
jquery-click-event
designated-initializer
nscharacterset
mysql-logic
large-data-volumes
focus-stealing
datadude
script-tag
cstring

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