项目作者: MohammadMD1383

项目描述 :
Compile sass/scss in visual studio code without need of installing Node.js
高级语言: TypeScript
项目地址: git://github.com/MohammadMD1383/vscode-sassc.git
创建时间: 2021-06-28T16:55:22Z
项目社区:https://github.com/MohammadMD1383/vscode-sassc

开源协议:MIT License

下载


Visual Studio Code SASS/SCSS Compiler

Compile sass/scss in visual studio code without need of installing Node.js

Table Of Contents

Features

  • Single Compilation: compile any sass/scss file without need of being in a sass/scss project:
    • see in vscode output
    • compile it next to current sass/scss file
    • compile it anywhere you want
  • Live View: see the compiled css next to sass/scss as you edit
  • Compile Project*: compile a sass/scss project
  • Watch Project*: use sass/scss watch feature to compile your project

How To

Single Compilation-Live View:

  1. open any .{sass,scss} file
  2. click the Image icon at top right of editor
  3. choose the compilation mode

Compile Project:

  1. open a vscode workspace(folder)
  2. add a sassconfig.json file at the root of your sass/scss files
  3. a status bar item appears (Compile Project)
  4. click on that and your project will be compiled

Watch Project:

  1. follow steps 1 and 2 of previous section
  2. right click on sassconfig.json file
  3. click Watch Project and your project will be watched
    • open commands by pressing F1
      • destroy watch: destroys an active watch
      • show active watches: shows the current active watches

Config File

Here is the syntax of sassconfig.json file:

  1. {
  2. outDir?: string,
  3. removeComments?: boolean,
  4. sourceMaps?: boolean,
  5. indentType?: "space" | "tab",
  6. indentWidth?: number,
  7. linefeed?: "cr" | "crlf" | "lf" | "lfcr",
  8. omitSourceMapUrl?: boolean,
  9. outputStyle?: "expanded" | "compressed"
  10. }

Extension API

This extension provides some commands that can be used by other extensions

Current Commands:

Known Issues

  • nothing yet!


*: needs sassconfig.json file to be in the root of sass/scss project