mirror of
https://github.com/GenderDysphoria/GenderDysphoria.fyi.git
synced 2025-11-25 20:42:40 +00:00
Move off of sass legacy api and disable deprecation warnings
This commit is contained in:
@@ -45,21 +45,14 @@ class Sass extends File {
|
||||
contents = contents.replace(match, insert);
|
||||
}
|
||||
|
||||
const sassOptions = {
|
||||
data: contents,
|
||||
file: resolve(this.input),
|
||||
includePaths: [
|
||||
let { css } = await sass.compileStringAsync(contents, {
|
||||
loadPaths: [
|
||||
resolve(this.cwd),
|
||||
resolve('node_modules'),
|
||||
],
|
||||
sourceMapEmbed: true,
|
||||
};
|
||||
|
||||
let { css } = await (new Promise((resolve, reject) => { // eslint-disable-line no-shadow
|
||||
sass.render(sassOptions, (err, result) => (
|
||||
err ? reject(err) : resolve(result)
|
||||
));
|
||||
}));
|
||||
silenceDeprecations: [ 'mixed-decls', 'color-functions', 'global-builtin', 'import' ],
|
||||
});
|
||||
|
||||
if (prod) {
|
||||
css = (await postcss([ autoprefixer ]).process(css, {
|
||||
|
||||
Reference in New Issue
Block a user