Commit graph

98 commits

Author SHA1 Message Date
Natalie Weizenbaum 8a14419856 Continue loading Node Sass by default
This documents the option to use Dart Sass, and encourages users to
explicitly choose their implementation, but it doesn't change the
existing behavior.
2018-10-16 17:57:46 +10:00
Natalie Weizenbaum 7cc2db1168 Make this package implementation-agnostic
Rather than always loading Node Sass, this now requires users to pass
in either Dart Sass or Node Sass to the require() call.

Closes #672
2018-10-16 17:57:46 +10:00
Daniel Kvistgaard 71471c2d2c Declaring logError as function instead of arrow function. 2018-04-08 13:05:50 +10:00
xzyfer 7656eff297 Adopt airbnb eslint preset 2018-03-24 12:55:37 +11:00
Charles Samborski e61535250e Drop dependency on deprecated gulp-util
Closes dlmanning/gulp-sass#646
2018-03-24 12:55:35 +11:00
Yusril Herlian Syah 2b090fe07d Add whitespace 2018-01-30 09:24:06 +11:00
xzyfer 035b759f51 Prevent options leaking between compilations
Currently options are leaking between compilation runs. This is most
evident when using an array of importers. The array is shallow copied
internally, and the children of that array are wrapped by Node Sass.

When the next file is compiled the options are shallow copied once
again however this time the importer array contains the wrapped
importers not the original ones.

Instead of shallow copying with `Object.assign` this patch does a
full deep clone. Node Sass should also do this to prevent mutating
the options being passed in.

Related sass/node-sass#1168
Fixes #467 (probably)
2016-06-15 20:54:04 +10:00
xzyfer 1d72ed3fc1 Restore includePaths logic
I believe this was mistakenly removed in #353.

@eoneill can you shed some light on why you removed this? It has
caused issues for users.

Fixes #469
Fixes #473
2016-04-21 23:49:31 +10:00
Michael Mifsud 74d6a1a6ab Merge pull request #353 from eoneill/master
Add the .file property to options before handing off to node-sass
2016-03-16 16:06:46 +11:00
Vincent Prouillet 52fba693e0 Merge pull request #420 from jlgeering/error-msg-unformatted
preserve the original error message for notification(s) support
2015-12-21 10:53:18 +00:00
Jean-Luc Geering 3075a845c6 preserve the original error message 2015-12-21 09:45:33 +01:00
Aaron Schloser b3fe81f86a add relativePath property to error object in order to play nicely with gulp-notify 2015-12-18 10:35:52 -08:00
Eugene ONeill cc31400b55 fix sourcemap transform 2015-12-03 16:14:27 -08:00
Eugene ONeill 058b42c80a remove unnecessary includePaths adjusts now that we're setting file property correctly 2015-12-03 16:14:27 -08:00
Eugene ONeill 31a3218ae6 add the .file property to options before handing off to node-sass 2015-12-03 16:14:27 -08:00
Joe Bruno 4e51591c96 Forgot a comma ... 2015-12-02 12:36:37 -05:00
Joe Bruno 19f54ce753 changed var srcs to filteredSources + Travis Fix
I changed var srcs to filteredSources to be more semantic and closer to the existing formatting. I moved the var declaration to the top level in an attempt to comply with the established coding standards.
2015-12-02 12:30:41 -05:00
Joe Bruno 9c042f3cc2 Remove the commented code and l95 2015-12-02 12:13:53 -05:00
Joe Bruno 00963bc41f Fixed sourcemaps filename issue ('stdin')
Fixed the issue where sourcemaps were not displaying the correct filename, but were instead displaying 'stdin'
2015-12-01 13:15:29 -05:00
xzyfer 1f11c8d066 Update dev dependencies
Some of our dev dependencies are at least a major version behind.
This require update required updating our .eslintrc config because
some of the rules we used have been removed.
2015-10-26 01:54:22 +11:00
Michael Mifsud 33a8a4fee9 Merge pull request #358 from xzyfer/fix/empty-file
An empty Sass file should produce an empty CSS file
2015-10-26 01:34:12 +11:00
xzyfer 57f8c6d7ea Use LibSass' pre-formatted error messages 2015-10-26 01:20:58 +11:00
xzyfer f8a75e6adf An empty Sass file should produce an empty CSS file
Currently if the input file is blank we bail out early, returning
the input file object. This causes gulp to simply copy the input
Sass file. We instead need to rewrite the file extension to .css.
Fixes #352
2015-10-05 15:09:26 +11:00
Martin O'Connor 77e66a795a Use path.dirname for enhanced readability 2015-07-30 22:26:15 -04:00
Martin O'Connor fb26b3a259 Update file processing to a cross platform solution 2015-07-30 14:32:41 -04:00
Martin O'Connor 9cb5f1cb5c Modify sourcemap paths of imported files relative to file.base instead of relative to file, if a different base is specified. 2015-07-30 12:33:15 -04:00
Bogdan Chadkin 38e3c361f1 Fixed sourcemaps with different file.base 2015-07-12 22:32:17 +03:00
Sam Richard 1604fe745d 🐛 Fix empty partials copied to CSS folder
Resolves #306
2015-06-27 12:39:28 -05:00
Sam Richard 273e0a33f8 Merge pull request #293 from mariusc23/master
Fix gulp watch stopping on error.
2015-06-25 09:36:35 -05:00
AJ Ostrow 7f6605e433 check contents length for empty file 2015-06-10 17:45:12 -04:00
Marius Craciunoiu 061fce9878 Use gutil.PluginError instead of log. 2015-06-09 17:34:58 -04:00
Marius Craciunoiu de7414b630 Fix gulp watch stopping on error. 2015-06-09 16:46:29 -04:00
Thomas Jaggi 62af7d477a Error handling: Throw complete sass error but extend message 2015-05-12 18:48:07 +02:00
Linus Miller 9407865e27 Unshift instead of push current files path onto includePaths. 2015-05-12 13:31:04 +02:00
Thomas Jaggi bdb05ca910 Add test case with gulp-sourcemaps and autoprefixer 2015-05-09 12:12:13 +02:00
David Peter c1d629c209 Allow you to change the compiler and expose it
This will let you write sass.compiler.types, for example, and access the
sass types without having to require it in your main app.

Additionally, this lets you use a forked compiler, or a different branch
of the same compiler.
2015-04-14 12:23:54 -04:00
Sam Richard b7ade97b7a Indented Syntax support 2015-04-01 12:32:12 -04:00
Sam Richard 0fefd16607 Updated vars and includePaths based on comments 2015-04-01 10:43:39 -04:00
Sam Richard 4c4c3c125e A little bit of source map massaging 2015-03-31 16:26:29 -04:00
Sam Richard 3cdf1a325d Passing file as data
Resolves dlmanning/gulp-sass#158 once I get it working
2015-03-31 15:55:26 -04:00
Sam Richard 5c14789228 Updated Message style
Aligns with Stylish reporter (used in ESLint, jshint-stylish, etc…

Removed colors from message except for  which is a standard Gulp log output color

Includes line and column in error report
2015-03-30 08:16:04 -04:00
Sam Richard ca990d0981 DRY'ed out the push back into the stream 2015-03-26 20:19:33 -04:00
Sam Richard 7a2f8ac259 Resolved 2.x merge conflicts
# By Vincent Prouillet
# Via Vincent Prouillet
* '2.x' of github.com:Snugug/gulp-sass:
  Use plugin name const in logError

# Conflicts:
#	index.js
2015-03-26 19:55:20 -04:00
Sam Richard f416379458 Added Sync option
Addes `sass.sync` to allow users to compile synchronously.

Wrapped the async callback in an `if` statement controlled by a `sync` option for the main function

Added `renderSync` render option
2015-03-26 19:42:14 -04:00
Sam Richard 8bc76e15e6 Moved 'use strict' in index.js to global
Updated tests accordingly
2015-03-26 19:15:59 -04:00
Vincent Prouillet d77ca081c4 Use plugin name const in logError 2015-03-25 19:29:30 +00:00
Sam Richard 5f1812f623 Merge branch '2-sourcemaps' of https://github.com/Keats/gulp-sass into 2.x
# By Vincent Prouillet
# Via Vincent Prouillet
* '2-sourcemaps' of https://github.com/Keats/gulp-sass:
  Sourcemap paths seem to be relative now?

# Conflicts:
#	index.js
2015-03-24 15:21:47 -04:00
Sam Richard 5fbbc32bd9 Updated error message to more closely match 1.x 2015-03-24 15:15:54 -04:00
Sam Richard eca922cb2d Nicer function for logging errors 2015-03-24 07:32:46 -05:00
Vincent Prouillet 212e221212 Sourcemap paths seem to be relative now?
At least the test still pass and paths
looks the same with and without the relative fudge.
Sourcemaps are completely wonky though and do not point at the right thing

Also removes jshint since it's using eslint now
2015-03-24 12:16:31 +00:00