项目作者: kiennp

项目描述 :
SCSS/SASS compiler, HTML/SCSS/CSS/JS formatter
高级语言: TypeScript
项目地址: git://github.com/kiennp/web-assets-compiler.git
创建时间: 2020-05-13T03:04:34Z
项目社区:https://github.com/kiennp/web-assets-compiler

开源协议:MIT License

下载


Web assets compiler

A VSCode Extension that help you to compile SASS/SCSS files to CSS files.

Visual Studio Marketplace Version
Visual Studio Marketplace Installs
Visual Studio Marketplace Downloads
Visual Studio Marketplace Rating
GitHub

Features

  • Use js-beautify as SCSS/CSS/JS/HTML formatter
  • Compile SASS/SCSS to CSS
  • Autoprefix support for CSS
  • Live compile when save file or partial files
  • Customize format of export files
  • Customize compile options for a file/folder

Usage/Shortcuts

  1. Open command by press F1 or Ctrl + Shift + P (Cmd + Shift + P on MAC) and type Web assets compiler: Compile This File to compile opening file.
  2. Open command by press F1 or Ctrl + Shift + P (Cmd + Shift + P on MAC) and type Web assets compiler: Compile All to start compiler.
  3. Open command by press F1 or Ctrl + Shift + P (Cmd + Shift + P on MAC) and type Web assets compiler: Generate config file to save settings to config file in workspace root folder.

Extension Settings

  • You can use VS Code configurations or .webassetcompiler.json file at root of work folder.
  • .webassetcompiler.json will overwrites VS Code configurations
  • All changed in VS Code configurations will be reflected in .webassetcompiler.json if file is exists

VSCode settings

  1. {
  2. // enable/disable compile on save
  3. // default is true
  4. "webAssetsCompiler.compileOnSave": true,
  5. // export format list
  6. "webAssetsCompiler.exportFormats": [
  7. {
  8. // export style, expanded/compressed
  9. "format": "expanded",
  10. // output file extension (without dot)
  11. "extension": "",
  12. // enable/disable export source mapping
  13. // default is false
  14. "sourceMap": false
  15. }
  16. ],
  17. // list of watching folders
  18. "webAssetsCompiler.targetFolders" : [
  19. {
  20. // watching folder, relative path from work folder
  21. "input": "",
  22. // output folder, relative path from work folder
  23. "output": "",
  24. // watching all sub folder or not
  25. // default is true
  26. "includeSubFolder": true,
  27. // file name regex of include list
  28. // include all files if this value isn't set
  29. "includePattern": "",
  30. // file name regex of exclude list
  31. // no file is excluded if this value isn't set
  32. "excludePattern": "",
  33. // type of input file, SASS/SCSS
  34. // file extension will be used to check language name if this value isn't set
  35. "languageName": "",
  36. // same as `webAssetsCompiler.exportFormats`
  37. // `webAssetsCompiler.exportFormats` will be used if this value isn't set
  38. "formats": [
  39. {
  40. "format": "expanded",
  41. "extension": "",
  42. "sourceMap": false
  43. }
  44. ],
  45. }
  46. ]
  47. }

.webassetcompiler.json file

Same as VS Code settings without webAssetsCompiler prefix

Autoprefixer settings

Settings same as browserslist.
Click here for more details

SCSS/CSS/JS/HTML formatter settings

Using .jsbeautifyrc file for settings same as js-beautify.
Click here for more details

* SCSS will use all settings for CSS