From 331f5acc24c659fe60ec44d1da7beefc0bd84564 Mon Sep 17 00:00:00 2001 From: yutent Date: Sun, 9 Oct 2022 14:57:50 +0800 Subject: [PATCH] update scss --- index.js | 8 +++----- package.json | 18 +++++++++++------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/index.js b/index.js index 9854c17..ae1fcfe 100644 --- a/index.js +++ b/index.js @@ -6,7 +6,7 @@ const vsc = require('vscode') const path = require('path') -const scss = require('sass') +const scss = require('@bytedo/sass') const fs = require('iofs') const postcss = require('postcss') @@ -24,7 +24,7 @@ let options = { exclude: '' } -std.out = function(msg) { +std.out = function (msg) { std.appendLine(msg) } @@ -131,7 +131,6 @@ const Compiler = { return } } - this.compile(doc) } } @@ -174,7 +173,6 @@ function __init__() { options.outdir = path.join(options.workspace, options.outdir) } } - if (options.exclude) { options.exclude = new RegExp(options.exclude, 'i') } @@ -188,7 +186,7 @@ function __init__() { function deactivate() {} -exports.activate = function(ctx) { +exports.activate = function (ctx) { __init__() vsc.workspace.onDidChangeConfiguration(__init__) diff --git a/package.json b/package.json index b4c6d0a..d256098 100644 --- a/package.json +++ b/package.json @@ -2,16 +2,20 @@ "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.2.2", + "version": "3.2.3", "publisher": "yutent", "author": "Yutent [@yutent]", "icon": "logo.png", "engines": { "vscode": "^1.28.0" }, - "categories": ["Formatters"], - "activationEvents": ["*"], - "main": "out.js", + "categories": [ + "Formatters" + ], + "activationEvents": [ + "*" + ], + "main": "index.js", "contributes": { "commands": [ { @@ -94,9 +98,9 @@ "license": "MIT", "dependencies": { "autoprefixer": "^9.3.1", - "iofs": "^1.1.0", - "postcss": "^7.0.6", - "sass": "^1.35.1" + "iofs": "^1.5.2", + "@bytedo/sass": "^1.54.8", + "postcss": "^7.0.6" }, "devDependencies": { "esbuild": "^0.12.14"