在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):sindresorhus/gulp-ruby-sass开源软件地址(OpenSource Url):https://github.com/sindresorhus/gulp-ruby-sass开源编程语言(OpenSource Language):JavaScript 96.3%开源软件介绍(OpenSource Introduction):DeprecatedThis project is deprecated because Ruby Sass is deprecated. Switch to gulp-ruby-sassCompiles Sass with the Sass gem and pipes the results into a gulp stream. Install
Requires Sass >=3.4. Usagesass(source, [options])Use gulp-ruby-sass instead of const gulp = require('gulp');
const sass = require('gulp-ruby-sass');
gulp.task('sass', () =>
sass('source/file.scss')
.on('error', sass.logError)
.pipe(gulp.dest('result'))
); sourceType: File or glob pattern ( optionsType: Object containing plugin and Sass options. bundleExecType: Run Sass with bundle exec. sourcemapType: Initialize and pass Sass sourcemaps to gulp-sourcemaps. Note this option replaces Sass's const gulp = require('gulp');
const sass = require('gulp-ruby-sass');
const sourcemaps = require('gulp-sourcemaps');
gulp.task('sass', () =>
sass('source/file.scss', {sourcemap: true})
.on('error', sass.logError)
// for inline sourcemaps
.pipe(sourcemaps.write())
// for file sourcemaps
.pipe(sourcemaps.write('maps', {
includeContent: false,
sourceRoot: 'source'
}))
.pipe(gulp.dest('result'))
); baseType: Identical to tempDirType: This plugin compiles Sass files to a temporary directory before pushing them through the stream. Use emitCompileErrorType: Emit a gulp error when Sass compilation fails. verboseType: Log the spawned Sass or Bundler command. Useful for debugging. Sass optionsAny additional options are passed directly to the Sass executable. The options are camelCase versions of Sass's options parsed by Run gulp.task('sass', () =>
sass('source/file.scss', {
precision: 6,
stopOnError: true,
cacheLocation: './',
loadPath: [ 'library', '../../shared-components' ]
})
.on('error', sass.logError)
.pipe(gulp.dest('result'))
); sass.logError(err)Convenience function for pretty error logging. sass.clearCache([tempDir])In rare cases you may need to clear gulp-ruby-sass's cache. This sync function deletes all files used for Sass caching. If you've set a custom temporary directory in your task you must pass it to IssuesThis plugin wraps the Sass gem for the gulp build system. It does not alter Sass's output in any way. Any issues with Sass output should be reported to the Sass issue tracker. Before submitting an issue please read the contributing guidelines. LicenseMIT © Sindre Sorhus |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论