You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 23, 2021. It is now read-only.
Use gulp-ruby-sass *instead of `gulp.src`* to compile Sass files.
19
21
20
22
```js
21
-
var gulp =require('gulp');
22
-
var sass =require('gulp-ruby-sass');
23
-
24
-
gulp.task('sass', function() {
25
-
returnsass('source/file.scss')
26
-
.on('error', sass.logError)
27
-
.pipe(gulp.dest('result'));
28
-
});
23
+
constgulp=require('gulp');
24
+
constsass=require('gulp-ruby-sass');
25
+
26
+
gulp.task('sass', () =>
27
+
sass('source/file.scss')
28
+
.on('error', sass.logError)
29
+
.pipe(gulp.dest('result'))
30
+
);
29
31
```
30
32
31
33
#### source
32
34
33
-
Type: `String` or `Array`
35
+
Type: `string`, `array`
34
36
35
-
A file or glob pattern (`source/**/*.scss`) to compile. Ignores files prefixed with an underscore. **Directory sources are not supported.**
37
+
File or glob pattern (`source/**/*.scss`) to compile. Ignores files prefixed with an underscore. **Directory sources are not supported.**
36
38
37
39
#### options
38
40
39
-
Type: `Object`
41
+
Type: `object`
40
42
41
-
An object containing plugin and Sass options. Available options include:
43
+
Object containing plugin and Sass options.
42
44
43
45
##### bundleExec
44
46
45
-
Type: `Boolean`
47
+
Type: `boolean`<br>
46
48
Default: `false`
47
49
48
50
Run Sass with [bundle exec](http://gembundler.com/man/bundle-exec.1.html).
49
51
50
52
##### sourcemap
51
53
52
-
Type: `Boolean`
54
+
Type: `boolean`<br>
53
55
Default: `false`
54
56
55
57
Initialize and pass Sass sourcemaps to [gulp-sourcemaps](https://github.com/floridoo/gulp-sourcemaps). Note this option replaces Sass's `sourcemap` option.
Identical to `gulp.src`'s [`base` option](https://github.com/gulpjs/gulp/blob/master/docs/API.md#optionsbase).
84
83
85
84
##### tempDir
86
85
87
-
Type: `String`
88
-
Default: the system temp directory as reported by [os-tempDir](https://github.com/sindresorhus/os-tmpdir)
86
+
Type: `string`<br>
87
+
Default: System temp directory
89
88
90
89
This plugin compiles Sass files to a temporary directory before pushing them through the stream. Use `tempDir` to choose an alternate directory if you aren't able to use the default OS temporary directory.
91
90
92
91
##### emitCompileError
93
92
94
-
Type: `Boolean`
93
+
Type: `boolean`<br>
95
94
Default: `false`
96
95
97
96
Emit a gulp error when Sass compilation fails.
98
97
99
98
##### verbose
100
99
101
-
Type: `Boolean`
100
+
Type: `boolean`<br>
102
101
Default: `false`
103
102
104
103
Log the spawned Sass or Bundler command. Useful for debugging.
105
104
106
105
##### Sass options
107
106
108
-
Any additional options are passed directly to the Sass executable. The options are camelCase versions of Sass's options parsed by [dargs](https://github.com/sindresorhus/dargs).
107
+
Any additional options are passed directly to the Sass executable. The options are camelCase versions of Sass's options parsed by [`dargs`](https://github.com/sindresorhus/dargs).
109
108
110
109
Run `sass -h` for a complete list of Sass options.
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 `clearCache`.
132
131
132
+
133
133
## Issues
134
134
135
135
This 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](https://github.com/sass/sass/issues).
136
136
137
137
Before submitting an issue please read the [contributing guidelines](https://github.com/sindresorhus/gulp-ruby-sass/blob/master/contributing.md).
0 commit comments