Skip to content

Gulp plugin that lets you create custom aliases for CSS,less and SASS properties with an @alias rule

License

Notifications You must be signed in to change notification settings

bjcooper/gulp-scss-aliases

 
 

Repository files navigation

js-semistandard-styleBuild StatusCode ClimatenpmDependenciesdevDependenciesNPM version

gulp-style-aliases

Gulp plugin that lets you create custom aliases for CSS,less and SASS properties with an @alias rule. Supports @import '...' and url('...').

Install

$ npm install --save-dev gulp-style-aliases

Usage

const gulp = require('gulp');
const aliases = require('gulp-style-aliases');

var webPath = '.', outputPath = 'dest';

gulp.task('default', () =>
	gulp.src('src/*.{css|less|scss}')
		.pipe(aliases({
		    "@aliasName": "path/to/your/folder"
		}))
		.pipe(gulp.dest(outputPath))
);

A javascript file before compilation

@import "@aliasName/css/user.less";

body {
  background: #9e9e9e;
}

will become:

@import "path/to/your/folder/css/user.less";

body {
  background: #9e9e9e;
}

About

Gulp plugin that lets you create custom aliases for CSS,less and SASS properties with an @alias rule

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%