chore: use sass instead of node-sass (#1792)

* chore: use sass instead of node-sass

* perf: renderSync is slightly faster
better-error-message
Nolan Lawson 2020-05-28 21:06:24 -07:00 zatwierdzone przez GitHub
rodzic d26470592c
commit 3476b9dc7e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
3 zmienionych plików z 63 dodań i 610 usunięć

Wyświetl plik

@ -1,4 +1,4 @@
import sass from 'node-sass'
import sass from 'sass'
import path from 'path'
import fs from 'fs'
import { promisify } from 'util'
@ -7,7 +7,6 @@ import { TextDecoder } from 'text-encoding'
const writeFile = promisify(fs.writeFile)
const readdir = promisify(fs.readdir)
const render = promisify(sass.render.bind(sass))
const globalScss = path.join(__dirname, '../src/scss/global.scss')
const defaultThemeScss = path.join(__dirname, '../src/scss/themes/_default.scss')
@ -16,7 +15,7 @@ const themesScssDir = path.join(__dirname, '../src/scss/themes')
const assetsDir = path.join(__dirname, '../static')
async function renderCss (file) {
return (await render({ file, outputStyle: 'compressed' })).css
return sass.renderSync({ file, outputStyle: 'compressed' }).css
}
async function compileGlobalSass () {

Wyświetl plik

@ -83,7 +83,6 @@
"lodash-webpack-plugin": "^0.11.5",
"mkdirp": "^1.0.3",
"node-fetch": "^2.6.0",
"node-sass": "^4.14.1",
"npm-run-all": "^4.1.5",
"p-any": "^3.0.0",
"page-lifecycle": "^0.1.2",
@ -97,6 +96,7 @@
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-terser": "^5.2.0",
"sapper": "nolanlawson/sapper#for-pinafore-21",
"sass": "^1.26.5",
"stringz": "^2.1.0",
"svelte": "^2.16.1",
"svelte-extras": "^2.0.2",

666
yarn.lock

Plik diff jest za duży Load Diff