fixed include paths

master
宇天 2021-08-04 17:44:33 +08:00
parent ddd1302199
commit 8b3499f8aa
2 changed files with 12 additions and 11 deletions

View File

@ -11,9 +11,17 @@ const scss = require('sass')
const fs = require('iofs')
const postcss = require('postcss')
const autoprefixer = require('autoprefixer')
let prefixer
const std = vsc.window.createOutputChannel('scss-to-css')
let prefixer
let options = {
compileOnSave: true,
autoPrefixer: true,
output: 'compressed',
exclude: ''
}
std.out = function(msg) {
std.appendLine(msg)
}
@ -21,26 +29,19 @@ std.out = function(msg) {
// 编译scss
function render(style, file) {
try {
let data = fs.cat(file).toString()
return (
scss.renderSync({
data,
file,
outputStyle: style
}).css + ''
).trim()
} catch (err) {
std.out(err)
std.show(true)
// console.error(err)
}
}
let options = {
compileOnSave: true,
autoPrefixer: true,
output: 'compressed',
exclude: ''
}
const compileScss = (style, entry, output) => {
if (options.outdir) {
let tmp = output.replace(options.workspace, '.')

View File

@ -2,7 +2,7 @@
"name": "scss-to-css",
"displayName": "scss-to-css",
"description": "🔥 The easiest way to compile scss file to css. And autoprefixer at the same time.",
"version": "3.1.0",
"version": "3.1.1",
"publisher": "yutent",
"author": "Yutent [@yutent]",
"icon": "logo.png",