All Projects → mikevercoelen → gulp-sass-glob

mikevercoelen / gulp-sass-glob

Licence: other
Use glob includes in sass

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to gulp-sass-glob

angularJS
这个仓库提供git使用教程 gulp使用教程 angularJS入门->进阶 的教程
Stars: ✭ 61 (+8.93%)
Mutual labels:  gulp
alias
Resolve TypeScript import aliases and paths.
Stars: ✭ 19 (-66.07%)
Mutual labels:  gulp
Azia-Admin-Bootstrap-Template
Free Bootstrap 4 Admin template
Stars: ✭ 73 (+30.36%)
Mutual labels:  gulp
mark.js
mark.js用于标记选中的文字,自定义插入标签
Stars: ✭ 27 (-51.79%)
Mutual labels:  gulp
twoobl
Blank theme for Elementor
Stars: ✭ 19 (-66.07%)
Mutual labels:  gulp
developer-platform-install
Single Installer for all Red Hat Development Tools and more. Download it form Red Hat Developers Portal web site - http://developers.redhat.com/products/devsuite/overview/.
Stars: ✭ 24 (-57.14%)
Mutual labels:  gulp
is-my-train-delayed
An Angular web app built on Heroku with Node & Express. Shows information about delayed trains, and displays that in an easily consumable manner.
Stars: ✭ 15 (-73.21%)
Mutual labels:  gulp
gulp-ava
Run AVA tests
Stars: ✭ 56 (+0%)
Mutual labels:  gulp
lnv-mobile-base
移动端开发脚手架-基于gulp的使用zepto、handlebars、sass并且带移动端适配方案(flexible.js)的前端工作流,旨在帮助移动端项目的开发
Stars: ✭ 41 (-26.79%)
Mutual labels:  gulp
the-subway-of-china
中国地铁图
Stars: ✭ 104 (+85.71%)
Mutual labels:  gulp
project-manager-laravel
Project manager system - PHP and AngularJS
Stars: ✭ 17 (-69.64%)
Mutual labels:  gulp
igni-core
UNSUPPORTED: An easy to use & featherlight CMS that shortcuts the bootstrapping of backend PHP + MySQL based projects. Developed in Laravel, it uses the latest PHP coding standards and library versions.
Stars: ✭ 13 (-76.79%)
Mutual labels:  gulp
gulp-merge-json
A gulp plugin to merge JSON & JSON5 files into one file
Stars: ✭ 35 (-37.5%)
Mutual labels:  gulp
fractal-starter-kit
Starter kit for Fractal with SCSS, Webpack, XO, sass-lint and Gulp
Stars: ✭ 22 (-60.71%)
Mutual labels:  gulp
raven
Raven: a theme-able blog workflow with gulp, pug, sass, and markdown. Check out the demo here:
Stars: ✭ 16 (-71.43%)
Mutual labels:  gulp
wordpress-uikit-timber-theme
UIKit 3 Wordpress Starter Theme
Stars: ✭ 18 (-67.86%)
Mutual labels:  gulp
js-stack-from-scratch
🌺 Russian translation of "JavaScript Stack from Scratch" from the React-Theming developers https://github.com/sm-react/react-theming
Stars: ✭ 394 (+603.57%)
Mutual labels:  gulp
gulp-jstransform
Gulp plugin to transform ES6 to ES5.
Stars: ✭ 16 (-71.43%)
Mutual labels:  gulp
personal-page
Personal Page is a project that contains a person's personal information and resume.
Stars: ✭ 20 (-64.29%)
Mutual labels:  gulp
practical-front-end
essential front-end skills for .Net developers
Stars: ✭ 28 (-50%)
Mutual labels:  gulp

Package Quality

Package Quality Build Status

gulp-sass-glob

Gulp plugin for gulp-sass to use glob imports.

Install

npm install gulp-sass-glob --save-dev

Basic Usage

main.scss

@import "vars/**/*.scss";
@import "mixins/**/*.scss";
@import "generic/**/*.scss";
@import "../components/**/*.scss";
@import "../views/**/*.scss";
@import "../views/**/*something.scss";
@import "../views/**/all.scss";

NOTE: Also support using ' (single quotes) for example: @import 'vars/**/*.scss';

gulpfile.js

var gulp = require('gulp');
var sass = require('gulp-sass');
var sassGlob = require('gulp-sass-glob');

gulp.task('styles', function () {
    return gulp
        .src('src/styles/main.scss')
        .pipe(sassGlob())
        .pipe(sass())
        .pipe(gulp.dest('dist/styles'));
});

Ignoring files and directories by pattern

You can optionally provide an array of paths to be ignored. Any files and directories that match any of these glob patterns are skipped.

gulp.task('styles', function () {
    return gulp
        .src('src/styles/main.scss')
          .pipe(sassGlob({
              ignorePaths: [
                  '**/_f1.scss',
                  'recursive/*.scss',
                  'import/**'
              ]
          }))
        .pipe(sass())
        .pipe(gulp.dest('dist/styles'));
});

Troubleshooting

Nested glob imports

gulp-sass-glob currently does NOT support nested glob imports i.e.

main.scss

@import 'blocks/**/*.scss';

blocks/index.scss

@import 'other/blocks/**/*.scss';

This will throw an error, because gulp-sass-glob does NOT read nested import structures.

Solving nested glob imports

You have to think diffrent about your sass folder structure, what I suggest to do is:

  • Point your gulp styles task ONLY to main.scss
  • In main.scss -> ONLY in this file I use glob imports

Problem solved.

Thanks and love

Contribute

Run tests

npm test

Build dist

npm run compile
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].