Skip to content

Commit

Permalink
v6.0.1
Browse files Browse the repository at this point in the history
# 6.0.1 - 2023-02-09

<small>[Compare to previous release][comp:6.0.1]</small>

### Changed

-   Corrected information about the new `liveSassCompile.settings.useNewCompiler` setting
-   Updated the docs: fixed a link and also corrected references to the new minimum VS Code version (1.74)
-   Tweaked some code to make it slightly more performant when processing many workspaces or many files

### Updated

-   `fdir` to `6.0.1` [Changelog][cl:fd]

[comp:6.0.1]: v6.0.0...v6.0.1
[cl:fd]: https://github.com/thecodrr/fdir/releases
  • Loading branch information
glenn2223 authored Feb 9, 2023
2 parents 4f5d252 + 1236013 commit 03a716a
Show file tree
Hide file tree
Showing 9 changed files with 260 additions and 325 deletions.
21 changes: 19 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ Types of changes

All notable changes to this project will be documented in this file.

## [6.0.1] - 2023-02-09

<small>[Compare to previous release][comp:6.0.1]</small>

### Changed

- Corrected information about the new `liveSassCompile.settings.useNewCompiler` setting
- Updated the docs: fixed a link and also corrected references to the new minimum VS Code version (1.74)
- Tweaked some code to make it slightly more performant when processing many workspaces or many files

### Updated

- `fdir` to `6.0.1` [Changelog][cl:fd]

## [6.0.0] - 2023-02-07

<small>[Compare to previous release][comp:6.0.0]</small>
Expand All @@ -37,7 +51,8 @@ All notable changes to this project will be documented in this file.

### Added

- New `liveSassCompile.settings.useNewCompiler` setting. Use it to try the SASS 2.0 compiler - before it becomes mandatory
- New `liveSassCompile.settings.useNewCompiler` setting.
Try the new, more performant, SASS compiler - go on, kick the tyres on this new entry point. **Note:** `lineFeed`, `indentType` and `indentWidth` do not work in this new compiler (and never will <sup>[[ref]](https://github.com/sass/dart-sass/issues/1585#issuecomment-1005184692)</sup>)

### Fixed

Expand Down Expand Up @@ -630,7 +645,9 @@ All notable changes to this project will be documented in this file.
| 0.0.2 | 11.07.17 | Small description updated. |
| 0.0.1 | 11.07.17 | Initial Preview Release with following key features. <br> – Live SASS & SCSS Compile. <br> – Customizable file location of exported CSS. <br> – Customizable exported CSS Style (`expanded`, `compact`, `compressed`, `nested`.)<br> – Quick Status bar control.<br> – Live Reload to browser (`Live Server` extension dependency). |

[6.0.0]: https://github.com/glenn2223/vscode-live-sass-compiler/release/tag/v6.0.0
[6.0.1]: https://github.com/glenn2223/vscode-live-sass-compiler/releases/tag/v6.0.1
[comp:6.0.1]: https://github.com/glenn2223/vscode-live-sass-compiler/compare/v6.0.0...v6.0.1
[6.0.0]: https://github.com/glenn2223/vscode-live-sass-compiler/releases/tag/v6.0.0
[comp:6.0.0]: https://github.com/glenn2223/vscode-live-sass-compiler/compare/v5.5.1...v6.0.0
[5.5.1]: https://github.com/glenn2223/vscode-live-sass-compiler/compare/v5.5.0...v5.5.1
[5.5.0]: https://github.com/glenn2223/vscode-live-sass-compiler/compare/v5.4.0...v5.5.0
Expand Down
105 changes: 55 additions & 50 deletions docs/faqs.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# FAQs

Click a question to reveal its answer

<details>
Expand All @@ -11,37 +12,40 @@ Well, **lots of things**.
Firstly, welcome! I'm glad you're here!

Here's some of the most important changes:
- We now require VS Code version 1.52
- We are no longer dependant on `ritwickdey.LiveServer`. You can manually add this package to VS Code, if you need it
- Some settings have been changed
- `formats[].format` only accepts `compressed` or `expanded`
- `autoprefix`:
- The default is `defaults`
- `null` is no longer accepted, use `false` instead
- When `true` we will find a `.browserslistrc` file or `browserslist` in your `package.json`. No more duplicating settings!
- `showOutputWindow` is now `showOutputWindowOn` and uses log values (`Debug`, `Error`, etc.). It's default log level is `Information` - at this level it will output the same information that the original extension does
- Some settings are new!
- `formats[].savePathReplacementPairs`: replace segments in the output path
- `formats[].linefeed`: control the line terminator used
- `formats[].indentType`: control whether indents are spaces or tabs
- `formats[].indentWidth`: control the width of the indentation
- `watchOnLaunch`: state whether you want to watch files upon launch
- `compileOnWatch`: state if files should be compiled upon watching
- `forceBaseDirectory`: state the base directory of all you SASS files. Aids in reducing wasted resources while searching for files
- `partialsList`: specify what files are actually partials (or which folders contain them)

- We now require VS Code version 1.74
- We are no longer dependant on `ritwickdey.LiveServer`. You can manually add this package to VS Code, if you need it
- Some settings have been changed
- `formats[].format` only accepts `compressed` or `expanded`
- `autoprefix`:
- The default is `defaults`
- `null` is no longer accepted, use `false` instead
- When `true` we will find a `.browserslistrc` file or `browserslist` in your `package.json`. No more duplicating settings!
- `showOutputWindow` is now `showOutputWindowOn` and uses log values (`Debug`, `Error`, etc.). It's default log level is `Information` - at this level it will output the same information that the original extension does
- Some settings are new!
- `formats[].savePathReplacementPairs`: replace segments in the output path
- `formats[].linefeed`: control the line terminator used
- `formats[].indentType`: control whether indents are spaces or tabs
- `formats[].indentWidth`: control the width of the indentation
- `watchOnLaunch`: state whether you want to watch files upon launch
- `compileOnWatch`: state if files should be compiled upon watching
- `forceBaseDirectory`: state the base directory of all you SASS files. Aids in reducing wasted resources while searching for files
- `partialsList`: specify what files are actually partials (or which folders contain them)
- `useNewCompiler`: use the latest version of the JS SASS compiler (which has been built to address some issues and has a modern, idiomatic API)

Here are some things you probably won't care about as much
- The extension has had a massive overhaul. Performance optimisation, and new features!
- We abandoned `glob` (the package, not the patterns) and we now use `fdir` which is blazingly fast
- New commands!
- `liveSass.command.compileCurrentSass`: perform a one-time compilation of the current SASS file
- `liveSass.command.createIssue`: opens a link to create a new issue in GutHub. If an unexpected error occurred then error information is readily available to paste into the new issue
- `liveSass.command.debugInclusion`: check if the current SASS file will be included, based on your settings
- `liveSass.command.debugFileList`: get a full list of files that are included and excluded
- Various commands to change the log level (meaning you can key bind them)
- We support multi-root/multi-folder workspaces
- Map files now link back to the correct line after `autoprefixer` has been applied
- Clicking the status bar icon while in the `Success` or `Error` state will show the output window

- The extension has had a massive overhaul. Performance optimisation, and new features!
- We abandoned `glob` (the package, not the patterns) and we now use `fdir` which is blazingly fast
- New commands!
- `liveSass.command.compileCurrentSass`: perform a one-time compilation of the current SASS file
- `liveSass.command.createIssue`: opens a link to create a new issue in GutHub. If an unexpected error occurred then error information is readily available to paste into the new issue
- `liveSass.command.debugInclusion`: check if the current SASS file will be included, based on your settings
- `liveSass.command.debugFileList`: get a full list of files that are included and excluded
- Various commands to change the log level (meaning you can key bind them)
- We support multi-root/multi-folder workspaces
- Map files now link back to the correct line after `autoprefixer` has been applied
- Clicking the status bar icon while in the `Success` or `Error` state will show the output window

</details>

Expand All @@ -52,11 +56,11 @@ Here are some things you probably won't care about as much

Create a `.vscode` folder in the root of your project. Inside the `.vscode` folder create a JSON file named `settings.json`.

Open the `settings.json` file and type following key-value pairs. *By the way, you'll get intellisense!*
Open the `settings.json` file and type following key-value pairs. _By the way, you'll get intellisense!_

```json
{
"liveSassCompile.settings.formats":[
"liveSassCompile.settings.formats": [
{
"format": "expanded",
"extensionName": ".css",
Expand All @@ -69,13 +73,11 @@ Open the `settings.json` file and type following key-value pairs. *By the way, y
}
],
"liveSassCompile.settings.excludeList": [
"**/node_modules/**",
".vscode/**"
"**/node_modules/**",
".vscode/**"
],
"liveSassCompile.settings.generateMap": true,
"liveSassCompile.settings.autoprefix": [
"defaults"
]
"liveSassCompile.settings.autoprefix": ["defaults"]
}
```

Expand All @@ -87,9 +89,9 @@ Open the `settings.json` file and type following key-value pairs. *By the way, y
</summary>

If the extension doesn't activate (show up in the status bar), then it's most likely that you don't have any `.scss` or`.sass` files in your project.

Just create a SASS file, or open one, and the extension will activate

Alternatively, if you're working with `.sass` files, you may not have the [SASS extension](https://marketplace.visualstudio.com/items?itemName=Syler.sass-indented) installed. Install it so VS Code can identify `.sass` files and activate the extension.

</details>
Expand All @@ -99,16 +101,18 @@ Alternatively, if you're working with `.sass` files, you may not have the [SASS
<h2>Why are my files not compiling?</h2>
</summary>

A common issue is incorrectly configured glob patterns used in the include/exclude settings. You can check your glob patterns [here](https://globster.xyz/) (*be aware that this site doesn't match all [picomatch expressions](https://github.com/micromatch/picomatch#library-comparisons)*).
A common issue is incorrectly configured glob patterns used in the include/exclude settings. You can check your glob patterns [here](https://globster.xyz/) (_be aware that this site doesn't match all [picomatch expressions](https://github.com/micromatch/picomatch#library-comparisons)_).

Still having problems? Try the below steps

1. Open the command palette by pressing <kbd>F1</kbd> or (<kbd>Ctrl</kbd>/<kbd>Cmd</kbd>) + <kbd>Shift</kbd> + <kbd>P</kbd>
1. Run `liveSass.command.debugInclusion`, this will open the output and tell you if the file is included based on your settings
1. If you can't resolve the issue with the information present then move on below
1. Next run `liveSass.command.debugFileList`
1. Try to resolve your issue using the returned information in the output

Still no luck?
Still no luck?

1. Run `liveSass.command.createIssue`
1. Information is automatically placed in your clipboard and your browser will open a new window
1. Please make sure to paste the information, which is now in your clipboard, into the location stated. Also include the information returned by the `liveSass.command.debugFileList` command from step 4 above
Expand All @@ -126,7 +130,7 @@ A multi-root workspaces is a project that gives you access to a folder at `C:/a/

By doing this, and when an extension is configured for it, you can have independent settings for each project. But don't worry, you don't need to duplicate settings! Default settings can be placed in the `.code-workspace` - these are then ignored if the same settings exists in a workspace folder's `settings.json`.

*Note: Each workspace folder must have a `.vscode` folder with a `settings.json` file for the settings to overwrite the workspace defaults.*
_Note: Each workspace folder must have a `.vscode` folder with a `settings.json` file for the settings to overwrite the workspace defaults._

### I like it! how do I set one up?

Expand All @@ -137,12 +141,13 @@ First, right click (left click on mac) in some open space on the `Explorer` tab.
### Okay, so what settings can I use?

The following settings can all be made available to each workspaces `settings.json` file.
- `liveSassCompile.settings.formats`
- `liveSassCompile.settings.excludeList`
- `liveSassCompile.settings.includeItems`
- `liveSassCompile.settings.generateMap`
- `liveSassCompile.settings.autoprefix`
- `liveSassCompile.settings.forceBaseDirectory`
- `liveSassCompile.settings.partialsList`

</details>

- `liveSassCompile.settings.formats`
- `liveSassCompile.settings.excludeList`
- `liveSassCompile.settings.includeItems`
- `liveSassCompile.settings.generateMap`
- `liveSassCompile.settings.autoprefix`
- `liveSassCompile.settings.forceBaseDirectory`
- `liveSassCompile.settings.partialsList`

</details>
4 changes: 1 addition & 3 deletions docs/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,7 @@ Tells the compiler that a leading slash is relative to the workspace root rather
> ℹ This setting can vary between workspace folders - [read more][multi-rootfaq]
In preparation for SASS2.0, you have early access to the new `compile` method. When `true` your code will be ran through this new compiler.
To help mitigate any issues I'd love people to try out the new compiler before it becomes compulsory in a later release.
SASS have introduced a new entry point in their JS API. This new API is designed to be more performant than the old one. Go on, kick the tyres on this new entry point (before it comes mandatory in SASS 2.0).
> **Warning**
> This method does not apply any of the following settings (and never will <sup>[[ref]](https://github.com/sass/dart-sass/issues/1585#issuecomment-1005184692)</sup>)
Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "live-sass",
"displayName": "Live Sass Compiler",
"description": "Compile Sass or Scss to CSS at realtime.",
"version": "6.0.0",
"version": "6.0.1",
"publisher": "glenn2223",
"author": {
"name": "Glenn Marks",
Expand Down Expand Up @@ -255,7 +255,7 @@
"boolean"
],
"default": false,
"description": "Set to `true` to use new SASS's new `compile` function",
"description": "Set to `true` to use new SASS's new `compile` function. It's more performant!",
"scope": "resource"
},
"liveSassCompile.settings.autoprefix": {
Expand Down Expand Up @@ -343,12 +343,11 @@
"pretest": "npm run rollup && tsc -p ./src/test/",
"test": "node ./out/test/runTest.js",
"lint": "eslint -c .eslintrc.js --ext .ts ./src/",
"rollup": "rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",
"webpack": "webpack --mode production"
"rollup": "rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript"
},
"dependencies": {
"autoprefixer": "^10.4.13",
"fdir": "^5.3.0",
"fdir": "^6.0.1",
"picomatch": "^2.3.1",
"postcss": "^8.4.21",
"sass": "^1.58.0"
Expand All @@ -372,7 +371,7 @@
"vscode-test": "^1.6.1"
},
"announcement": {
"onVersion": "6.0.0",
"message": "SassCompiler v6.0.0: try out the SASS 2.0 compiler with a new setting. Plus bug fixes and dependancy bumps"
"onVersion": "6.0.1",
"message": "SassCompiler v6.0.1: try out a speedier compiler with the new `useNewCompiler` setting. Plus doc changes and dependancy bumps"
}
}
1 change: 1 addition & 0 deletions rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default {
terser({ format: { comments: false } }),
commonjs({
ignoreDynamicRequires: true,
sourceMap: false,
}),
nodeResolve(),
],
Expand Down
Loading

0 comments on commit 03a716a

Please sign in to comment.