Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
gulp-compass
Advanced tools
Compile Sass to CSS using Compass
gulp-compass
requires the compass ruby gem in order to compile compass. This can easily be installed via Terminal.
$ gem update --system
$ gem install compass
Please refer the user guide
Install with npm
$ npm install gulp-compass --save-dev
load your compass config.rb
file. Please make sure css_dir
and sass_dir
value on config.rb
file.
css_dir
default value is css
.sass_dir
default value is sass
.if css_dir
value is stylesheets
, please add css
key as your define.
var compass = require('gulp-compass');
gulp.task('compass', function() {
gulp.src('./src/*.scss')
.pipe(compass({
config_file: './config.rb',
css: 'stylesheets'
}))
.pipe(gulp.dest('app/assets/temp'));
});
set your project path.
var compass = require('gulp-compass'),
path = require('path');
gulp.task('compass', function() {
gulp.src('./src/*.scss')
.pipe(compass({
project: path.join(__dirname, 'assets'),
css: 'css',
sass: 'sass'
}))
.pipe(gulp.dest('app/assets/temp'));
});
set your compass settings.
var compass = require('gulp-compass'),
minifyCSS = require('gulp-minify-css');
gulp.task('compass', function() {
gulp.src('./src/*.scss')
.pipe(compass({
css: 'app/assets/css',
sass: 'app/assets/sass',
image: 'app/assets/images'
}))
.pipe(minifyCSS())
.pipe(gulp.dest('app/assets/temp'));
});
default: nested
description: The output style for the compiled css. One of: nested, expanded, compact, or compressed.
default: true
description: Show line comments or not.
default: true
description: Are assets relative.
default: css
description: The target directory where you keep your css stylesheets. It is relative to the project
option.
default: sass
description: The source directory where you keep your sass stylesheets. It is relative to the project
option.
default: js
description: The directory where you keep your javascripts. It is relative to the project
option.
default: font
description: The directory where you keep your fonts. It is relative to the project
option.
default: your project base
description: The location where all your assets are store.
default: true
description: show/hide compile log message.
default: false
description: The directory where you keep external Compass plugins or extensions that you would like to make available using the @import
function. Common use case would be setting this to your bower_components
directory for example. It is relative to the project
option.
default: false
description: Require the given Ruby library before running commands. This is used to access Compass plugins without having a project configuration file.
$ npm test
FAQs
Compile Compass files
The npm package gulp-compass receives a total of 2,437 weekly downloads. As such, gulp-compass popularity was classified as popular.
We found that gulp-compass demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.