-
Notifications
You must be signed in to change notification settings - Fork 77
feat: preprocess scss/sass styles with node-sass #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@yyx990803 Please review this. Other style dialect preprocessors would be built in similar fashion. |
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 except for a few small things.
lib/styleProcessors/index.ts
Outdated
map: any | null, | ||
options: any | ||
): StylePreprocessorResults { | ||
if (!nodeSass) nodeSass = require("node-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.
require calls are cached anyway so no need to cache it ourselves here
lib/styleProcessors/index.ts
Outdated
} | ||
|
||
export interface StylePreprocessorResults { | ||
source: string; |
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.
results should use code
instead of source
lib/styleProcessors/index.ts
Outdated
|
||
export interface StylePreprocessorResults { | ||
source: string; | ||
map?: any; |
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.
There are a bunch of semicolons, make sure to stay consistent with the style of the rest of the codebase
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.
Do we have a style lint config for ts? These semicolons were added by VS code format.
Btw I think we should start writing tests before working on other features. |
- Remove semi-colons - Use `code` instead of `source` in preprocessor output
No description provided.