Skip to content

Commit f80fd81

Browse files
committed
separate doc
1 parent fe6568b commit f80fd81

File tree

2 files changed

+133
-0
lines changed

2 files changed

+133
-0
lines changed

docs/faqs.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2+
## FAQ (For Beginners)
3+
4+
### How to config the settings in my project?
5+
6+
Create a `.vscode` folder in the root of project. Inside of `.vscode` folder create a json file named `settings.json`.
7+
Inside of the `settings.json`, type following key-value pairs. By the way you'll get intelli-sense.
8+
9+
```json
10+
{
11+
"liveSassCompile.settings.formats":[
12+
{
13+
"format": "expanded",
14+
"extensionName": ".css",
15+
"savePath": "/css"
16+
},
17+
{
18+
"extensionName": ".min.css",
19+
"format": "compressed",
20+
"savePath": "/dist/css"
21+
}
22+
],
23+
"liveSassCompile.settings.excludeList": [
24+
"**/node_modules/**",
25+
".vscode/**"
26+
],
27+
"liveSassCompile.settings.generateMap": true,
28+
"liveSassCompile.settings.autoprefix": [
29+
"> 1%",
30+
"last 2 versions"
31+
]
32+
}
33+
```

docs/settings.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
## Settings
2+
3+
* ~~**`liveSassCompile.settings.format`**~~
4+
<hr>
5+
* ~~**`liveSassCompile.settings.savePath`**~~
6+
<hr>
7+
* ~~**`liveSassCompile.settings.extensionName`**~~
8+
9+
<hr>
10+
* ***[NEW]*** **`liveSassCompile.settings.formats`** : To setup Format (style), Extension Name & Save location for exported css [Multiple Format Supported].
11+
12+
* *Format can be _`expanded`_, _`compact`_, _`compressed`_ or _`nested`_. _Default is `expanded`._*
13+
14+
* *Extension Name can be `.css` or `.min.css`. Default is `.css`.*
15+
16+
* ***[New]*** Save location is relative from workspace root or your Sass files.
17+
* Default value is `null`. (`null` means, it will generate CSS in the location of scss/sass. By The Way, It is `null`, NOT `"null"`).
18+
19+
* "`/`" denotes relative to root.
20+
21+
* "`~`" denotes relative to every sass file. - Complex Scenario. *([Checkout the example](https://github.com/ritwickdey/vscode-live-sass-compiler/issues/26#issue-274641546))*
22+
23+
* *Example :*
24+
25+
```js
26+
"liveSassCompile.settings.formats":[
27+
// This is Default.
28+
{
29+
"format": "expanded",
30+
"extensionName": ".css",
31+
"savePath": null
32+
},
33+
// You can add more
34+
{
35+
"format": "compressed",
36+
"extensionName": ".min.css",
37+
"savePath": "/dist/css"
38+
},
39+
// More Complex
40+
{
41+
"format": "compressed",
42+
"extensionName": ".min.css",
43+
"savePath": "~/../css/"
44+
}
45+
]
46+
```
47+
<hr>
48+
* **`liveSassCompile.settings.excludeList`:** To Exclude specific folders. All Sass/Scss files inside the folders will be ignored.
49+
* _default value :_
50+
```json
51+
"liveSassCompile.settings.excludeList": [
52+
"**/node_modules/**",
53+
".vscode/**"
54+
]
55+
```
56+
* You can use negative glob pattern.
57+
58+
* _Example : if you want exclude all file except `file1.scss` & `file2.scss` from `path/subpath` directory, you can use the expression -_
59+
60+
```json
61+
"liveSassCompile.settings.excludeList": [
62+
"path/subpath/*[!(file1|file2)].scss"
63+
]
64+
```
65+
<hr>
66+
* **`liveSassCompile.settings.includeItems`:** This setting is useful when you deals with only few of sass files. Only mentioned Sass files will be included.
67+
68+
* *NOTE: No need to include partial sass files.*
69+
* *Default value is `null`*
70+
* Example :
71+
```json
72+
"liveSassCompile.settings.includeItems": [
73+
"path/subpath/a.scss",
74+
"path/subpath/b.scss",
75+
]
76+
```
77+
<hr>
78+
* **`liveSassCompile.settings.generateMap`:** Set it as `false` if you don't want `.map` file for compiled CSS.
79+
* _Default is `true`._
80+
81+
<hr>
82+
* **`liveSassCompile.settings.autoprefix` :**
83+
Automatically add vendor prefixes to unsupported CSS properties (e. g. `transform` -> `-ms-transform`).
84+
85+
* _Specify what browsers to target with an array of strings (uses [Browserslist](https://github.com/ai/browserslist))._
86+
* _Set `null` to turn off. (Default is `null`)_
87+
88+
* Example:
89+
```json
90+
"liveSassCompile.settings.autoprefix": [
91+
"> 1%",
92+
"last 2 versions"
93+
]
94+
```
95+
<hr>
96+
* **`liveSassCompile.settings.showOutputWindow` :** Set this to `false` if you do not want the output window to show.
97+
* *NOTE: You can use the command palette to open the Live Sass output window.*
98+
* *Default value is `true`*
99+
100+
<hr>

0 commit comments

Comments
 (0)