make __expression property works in any object #157
make __expression property works in any object #157
Conversation
cde9144
to
0a1b674
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR! This looks good to me - @eliperelman do you agree? :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just have a few semantic requests.
README.md
Outdated
stringified by setting a special `__expression` property on them: | ||
|
||
``` js | ||
const Sass = require('sass') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make Sass
lowercase? Also, could you please put semicolons after these lines?
const sass = require('sass');
sass.__expression = `require('sass')`;
// ...
.use(MyPlugin, [{ fn: myFunction, implementation: sass, }]);
test/Config.js
Outdated
@@ -524,6 +524,10 @@ test('toString with custom prefix', t => { | |||
|
|||
test('static Config.toString', t => { | |||
const config = new Config(); | |||
const Sass = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use lowercase sass
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌 now
0a1b674
to
65fa28e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Because sass-loader support custom Sass implementation, and
dart-sass
implementation is an object, so I hope__expression
can works in any object