How to use the gulp-sass.compiler function in gulp-sass

To help you get started, we’ve selected a few gulp-sass examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github yoksel / shadowPainter / gulpfile.js View on Github external
var gulp = require('gulp');
let sync = require('browser-sync').create();
var reload = sync.reload;
var include = require('gulp-include');
var sass = require('gulp-sass');
var postcss = require('gulp-postcss');
var autoprefixer = require('autoprefixer');
var cssnano = require('cssnano');
var rename = require('gulp-rename');
var mqpacker = require('css-mqpacker');
var copy = require('gulp-copy');
var ghPages = require('gulp-gh-pages');
var colors = require('colors/safe');
var del = require('del');

sass.compiler = require('node-sass');

// SASS, AUTOPREFIXR, MINIMIZE
gulp.task('sass', function () {
  var processors = [
    autoprefixer({browsers: [
      'last 1 version',
      'last 2 Chrome versions',
      'last 2 Firefox versions',
      'last 2 Opera versions',
      'last 2 Edge versions'
    ]}),
    mqpacker()
  ];

  console.log('⬤  Run ' + colors.yellow('Sass') +
              ' + ' +
github igoradamenko / awsm.css / gulpfile.js View on Github external
/* requires */

const gulp = require('gulp');
const bs = require('browser-sync');
const del = require('del');

const sass = require('gulp-sass');
const sassCompiler = require('sass');
const Fiber = require('fibers');
sass.compiler = sassCompiler;

const pug = require('gulp-pug');
const stylelint = require('gulp-stylelint');
const postcss = require('gulp-postcss');
const autoprefixer = require('autoprefixer');
const discardComments = require('postcss-discard-comments');
const prefixWrap = require('postcss-prefixwrap');
const csso = require('gulp-csso');
const rename = require('gulp-rename');
const filter = require('gulp-filter');

const themes = require('./themes');

/* paths */

const input = {
github HDeiro / weskit / gulpfile.js View on Github external
const imagemin = require('gulp-imagemin');
const cssmin = require('gulp-cssmin');
const htmlreplace = require('gulp-html-replace');
const runsequence = require('run-sequence');
const fs = require('fs');
const yargs = require('yargs').argv;
const gulpif = require('gulp-if');
const gutil = require('gulp-util');
const jsonmin = require('gulp-jsonmin');
const minifyInline = require('gulp-minify-inline');
const spritesmith = require('gulp.spritesmith');
const jimp = require('gulp-jimp');
const glob = require("glob");
const sass = require('gulp-sass');
const del = require('del');
sass.compiler = require('node-sass');

//####################################
// List of Gulp tasks
//
// You can edit tasks names. For
// example: by default there's a css
// task, but you can exchange the name
// as you want. You could call it as
// styles, and you use it like:
//
//      gulp styles
//####################################

const tasks = {
  js: {
      bundler: 'js'
github yoksel / html-tree / gulpfile.js View on Github external
var gulp = require('gulp');
var sass = require('gulp-sass');
sass.compiler = require('node-sass');
var browserSync = require('browser-sync');
var reload = browserSync.reload;
var copy = require('gulp-copy');
var ghPages = require('gulp-gh-pages');
var colors = require('colors/safe');
var del = require('del');


gulp.task('css', function() {
  return gulp.src('src/scss/**/styles.scss')
    .pipe(sass().on('error', sass.logError))
    .pipe(gulp.dest('assets/css'));
});

// WATCH FILES FOR CHANGES AND RELOAD
function watch () {
github baptistecdr / aria2-extensions / gulpfile.js View on Github external
const del = require('del');
const gulp = require('gulp');
const htmlMinify = require('gulp-htmlmin');
const jsonMinify = require('gulp-json-minify');
const sass = require('gulp-sass');
sass.compiler = require('node-sass');
const babel = require("gulp-babel");
const webpack = require('webpack-stream');
const TerserPlugin = require('terser-webpack-plugin');
const pipeline = require('readable-stream').pipeline;

///
// Config
///

const htmlMinifyConfig = {
    collapseWhitespace: true,
    collapseInlineTagWhitespace: true,
    minifyCSS: true,
    sortAttributes: true,
    sortClassNames: true
};
github Lombiq / Orchard-Training-Demo-Module / Gulpfile.babel.js View on Github external
// information.

// Here you will see a standalone Gulpfile for copying third-party resources from the node_modules folder to wwwroot
// folder and also compiling our own resources (styles and scripts) and moving the results to the wwwroot folder as
// well. Note the .placeholder file in the wwwroot folder: that's a workaround that makes it possible to serve newly
// compiled static files during the first app start too (the issue is elaborated a bit in the text in the file itself).

// You've might noticed that the Gulpfile filename has a babel suffix which means that you can use code syntax from ES6
// and above with the help of Babel. To configure this you need to install @babel/core, @babel/preset-env and
// @babel/register Node packages and add a Babel config file to the root, see: .babelrc file.

import gulp from 'gulp';
// Gulp plugin used for compiling sass files. The sass compiler needs to be set explicitly.
import sass from 'gulp-sass';
import nodeSass from 'node-sass';
sass.compiler = nodeSass;
// Minifies css files.
import cleanCss from 'gulp-clean-css';
// Renames the file so the result will have a different name (i.e. .min.css or .min.js).
import rename from 'gulp-rename';
// Cache the result so the task won't be fully executed if it is not necessary.
import cached from 'gulp-cached';
// Gulp watcher if needed when we are actively developing a resource.
import watch from 'gulp-watch';
// This is a helper for generating a gulp pipeline for harvesting Vue applications from the current
// project's Assets folder and compiling them to wwwroot.
import getVueAppCompilerPipeline from '../Lombiq.VueJs/Assets/Scripts/helpers/get-vue-app-compiler-pipeline';

const paths = {
    imageFiles: './Assets/Images/**/*',
    imageFilesDestination: './wwwroot/Images',
github chalkygames123 / front-end-template / gulpfile.js / tasks / styles.js View on Github external
const gulpCsso = require('gulp-csso')
const gulpGzip = require('gulp-gzip')
const gulpIf = require('gulp-if')
const gulpPostcss = require('gulp-postcss')
const gulpSass = require('gulp-sass')
const gulpSourcemaps = require('gulp-sourcemaps')
const gulpStylelint = require('gulp-stylelint')
const sass = require('sass')

const config = require('../../config')
const common = require('../common')
const detectConflict = require('../utils/detectConflict')

const isDev = config.get('mode') !== 'production'

gulpSass.compiler = sass

module.exports = function styles() {
  return gulp
    .src(common.srcPaths.styles, {
      base: config.get('srcDir')
    })
    .pipe(gulpIf(isDev, gulpSourcemaps.init()))
    .pipe(
      gulpStylelint({
        reporters: [
          {
            formatter: 'string',
            console: true
          }
        ]
      })
github Logicify / mautic-theme-skeleton / gulpfile.js View on Github external
zip = require('gulp-zip'),
    path = require('path'),
    heml = require('gulp-heml'),
    clean = require('gulp-clean'),
    minify = require('gulp-html-minifier2'),
    include = require('gulp-file-include'),
    sass = require('gulp-sass'),
    sequence = require('gulp-sequence'),
    del = require('del'),
    rename = require("gulp-rename"),
    util = require('gulp-util'),
    fs = require('fs-extra'),
    es = require('event-stream'),
    args = require('yargs').argv;

sass.compiler = require('node-sass');

const config = require('./package.json');

const outputDir = './build',
    buildDirectory = path.join(outputDir, 'out'),
    themesDirectory = path.join(outputDir, 'themes'),
    emailsDirectory = path.join(outputDir, 'emails'),
    deployDir = config.mautic.mauticBasePath ?
        path.join(config.mautic.mauticBasePath, 'themes') : null,
    enableMinifier = config.mautic.enableMinifier;

function buildHeml(input, output) {
    return gulp.src(input)
        .pipe(include({
            prefix: '@'
        }))
github OpenLiberty / openliberty.io / src / main / content / antora_ui / gulpfile.js View on Github external
'use strict'

const { src, dest, parallel, series, watch } = require('gulp')
const sass = require('gulp-sass')
sass.compiler = require('node-sass')

const createTask = require('./gulp.d/lib/create-task')
const exportTasks = require('./gulp.d/lib/export-tasks')

const bundleName = 'ui'
const buildDir = 'build'
const previewSrcDir = 'preview-src'
const previewDestDir = 'public'
const srcDir = 'src'
const destDir = `${previewDestDir}/_`
const { reload: livereload } = process.env.LIVERELOAD === 'true' ? require('gulp-connect') : {}
const serverConfig = { host: '0.0.0.0', port: 5252, livereload }

const task = require('./gulp.d/tasks')
const glob = {
  all: [srcDir, previewSrcDir],

gulp-sass

Gulp plugin for sass

MIT
Latest version published 3 years ago

Package Health Score

62 / 100
Full package analysis