You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/overview.rst
+81-34Lines changed: 81 additions & 34 deletions
Original file line number
Diff line number
Diff line change
@@ -9,44 +9,62 @@
9
9
Overview
10
10
========
11
11
12
-
Boussole is working on **per-project configuration**, it means all your Sass sources to compile have to be organized in the same directory considered as the *sources directory*. Obviously you can organize them in multiple sub-directories within your sources directory.
12
+
Boussole is working on **per-project configuration**, it means all your Sass
13
+
sources to compile have to be organized in the same directory considered as the
14
+
*sources directory*. Obviously you can organize them in multiple sub-directories within your sources directory.
13
15
14
-
Your project can rely on some **Sass libraries that must be out of the source directory** to be defined in option ``LIBRARY_PATHS``.
16
+
Your project can rely on some **Sass libraries that must be out of the source
17
+
directory** to be defined in option ``LIBRARY_PATHS``.
15
18
16
-
Boussole does not really handle itself compilation, this is the role of `libsass-python`_. But for watch mode Boussole needs to inspect your Sass sources and so can raise some errors if they are invalid. These errors will be almost only about your ``@import`` rules.
19
+
Boussole does not really handle itself compilation, this is the role of
20
+
`libsass-python`_. But for watch mode Boussole needs to inspect your Sass sources
21
+
and so can raise some errors if they are invalid. These errors will be almost only
22
+
about your ``@import`` rules.
17
23
18
-
**Boussole is builded following Sass references** and all your Sass sources and libraries compatibles with libsass should be safe to compile.
24
+
**Boussole is builded following Sass references** and all your Sass sources and
25
+
libraries compatibles with libsass should be safe to compile.
19
26
20
27
21
28
Project configuration
22
29
*********************
23
30
24
-
A project **configuration lives in a file** which default attempted name is ``settings.json`` (JSON backend) or ``settings.yml`` (YAML backend).
31
+
A project **configuration lives in a file** which default attempted name is
32
+
``settings.json`` (JSON backend) or ``settings.yml`` (YAML backend).
25
33
26
34
Backend format
27
35
--------------
28
36
29
-
There is actually two supported backend format: JSON and YAML. Each of backend format expect is own default filename.
37
+
There is actually two supported backend format: JSON and YAML. Each of backend
38
+
format expect is own default filename.
30
39
31
-
However you can ask for a specific backend from command line use argument ``--backend``, value can be either ``json`` or ``yaml``.
40
+
However you can ask for a specific backend from command line use argument
41
+
``--backend``, value can be either ``json`` or ``yaml``.
32
42
33
43
Discovering
34
44
-----------
35
45
36
-
Boussole is able to discover your settings file if you don't explicitely give it as command argument with ``--config`` option.
46
+
Boussole is able to discover your settings file if you don't explicitely give it
47
+
as command argument with ``--config`` option.
37
48
38
-
Discovering is allways performed from current directory and will try to find a settings file using available backend default filename.
49
+
Discovering is allways performed from current directory and will try to find a
50
+
settings file using available backend default filename.
39
51
40
-
Such as if you have a ``settings.yml`` in your current directory, Boussole will assume it's your settings file to open. JSON backend is the first one to be checked so if you have both ``settings.json`` and ``settings.yml`` in your current directory, the JSON will be used.
52
+
Such as if you have a ``settings.yml`` in your current directory, Boussole will
53
+
assume it's your settings file to open. JSON backend is the first one to be
54
+
checked so if you have both ``settings.json`` and ``settings.yml`` in your current
55
+
directory, the JSON will be used.
41
56
42
-
You may possibly enforce a single backend to be used in discovery using the ``--backend`` option.
57
+
You may possibly enforce a single backend to be used in discovery using the
58
+
``--backend`` option.
43
59
44
-
Finally, if you give an explicit settings file path with ``--config`` there will be no discovering, Boussole will just open it directly.
60
+
Finally, if you give an explicit settings file path with ``--config`` there will
61
+
be no discovering, Boussole will just open it directly.
45
62
46
63
Sample
47
64
------
48
65
49
-
Here is a full sample of available settings for project configuration with JSON format:
66
+
Here is a full sample of available settings for project configuration with JSON
67
+
format:
50
68
51
69
.. sourcecode:: json
52
70
@@ -70,7 +88,8 @@ References
70
88
----------
71
89
72
90
.. Note::
73
-
Default values are referenced as Python values, you will need to adapt them according to the backend format you are using.
91
+
Default values are referenced as Python values, you will need to adapt them
92
+
according to the backend format you are using.
74
93
75
94
76
95
SOURCES_PATH
@@ -80,29 +99,40 @@ SOURCES_PATH
80
99
LIBRARY_PATHS
81
100
Default: ``[]``
82
101
83
-
(list) A list of paths (string) to your library imported from your Sass sources. Never try to add your source dir as a library and vice versa, this will trouble resolver and compiler.
102
+
(list) A list of paths (string) to your library imported from your Sass sources.
103
+
Never try to add your source dir as a library and vice versa, this will trouble
104
+
resolver and compiler.
84
105
85
-
If you plan to use some Sass libraries installed from npm, just add the path to ``node_modules`` directory, then you will be able to import them from your sources.
106
+
If you plan to use some Sass libraries installed from npm, just add the path to
107
+
``node_modules`` directory, then you will be able to import them from your
108
+
sources.
86
109
TARGET_PATH
87
110
Default: None, this is a required setting.
88
111
89
112
(string) Directory path where will be writed your compiled Sass sources.
90
113
OUTPUT_STYLES
91
114
Default: ``nested``
92
115
93
-
(string) keyword of output style type used to compile your Sass sources. Can be either ``compact``, ``expanded``, ``nested`` or ``compressed``.
116
+
(string) keyword of output style type used to compile your Sass sources. Can
117
+
be either ``compact``, ``expanded``, ``nested`` or ``compressed``.
94
118
SOURCE_COMMENTS
95
119
Default: ``False``
96
120
97
-
(boolean) If ``True``, comments about source lines will be added to each rule in resulted CSS from compile.
121
+
(boolean) If ``True``, comments about source lines will be added to each rule
122
+
in resulted CSS from compile.
98
123
SOURCE_MAP
99
124
Default: ``False``
100
125
101
-
(boolean) If ``True``, generate a source map for each compiled file. Source map filename will be the same that compiled file but with extension changed to ``.map``. The source map file is allways created in the same directory than CSS file.
126
+
(boolean) If ``True``, generate a source map for each compiled file. Source map
127
+
filename will be the same that compiled file but with extension changed to
128
+
``.map``. The source map file is allways created in the same directory than CSS
129
+
file.
102
130
EXCLUDES
103
131
Default: ``[]``
104
132
105
-
(list) A list of glob pattern (string) to exclude some paths/files from compile. Remember these pattern are allways matched against relative paths (from project directory).
133
+
(list) A list of glob pattern (string) to exclude some paths/files from compile.
134
+
Remember these pattern are allways matched against relative paths (from project
135
+
directory).
106
136
107
137
108
138
Help
@@ -120,9 +150,12 @@ And you can reach help about command options using: ::
120
150
Start a new project
121
151
*******************
122
152
123
-
Create directory and configuration file for a new project. Although you can create your project manually, this is an easy helper to do it and avoid forgetting some details.
153
+
Create directory and configuration file for a new project. Although you can create
154
+
your project manually, this is an easy helper to do it and avoid forgetting some
155
+
details.
124
156
125
-
Without arguments, command will prompt you to fill required values but you can also directly feed these values from arguments, see command help for details.
157
+
Without arguments, command will prompt you to fill required values but you can
158
+
also directly feed these values from arguments, see command help for details.
126
159
127
160
**Usage** ::
128
161
@@ -132,7 +165,8 @@ Without arguments, command will prompt you to fill required values but you can a
132
165
Compile
133
166
*******
134
167
135
-
Compile simply launch compiler on every eligible Sass source from your ``SOURCES_PATH`` directory.
168
+
Compile simply launch compiler on every eligible Sass source from your
169
+
``SOURCES_PATH`` directory.
136
170
137
171
**Usage** ::
138
172
@@ -142,9 +176,11 @@ Compile simply launch compiler on every eligible Sass source from your ``SOURCES
142
176
Watch
143
177
*****
144
178
145
-
Watcher will constantly watch about changes on files in your ``SOURCES_PATH`` directory.
179
+
Watcher will constantly watch about changes on files in your ``SOURCES_PATH``
180
+
directory and ``LIBRARY_PATHS`` paths.
146
181
147
-
When an event occurs, it will compile eligible sources from the file dependencies and itself.
182
+
When an event occurs, it will compile eligible sources from the file itself to
183
+
its dependencies.
148
184
149
185
Managed events can be :
150
186
@@ -153,21 +189,32 @@ Managed events can be :
153
189
* File move;
154
190
* File deletion.
155
191
156
-
Event about directories (like directory creation or moving) are ignored.
192
+
.. Note::
193
+
Event about directories (like directory creation or moving) are ignored.
157
194
158
195
.. Note::
159
-
Compile errors won't break the watcher so you can resolve them and try again to compile.
196
+
Compile errors won't break the watcher so you can resolve them and try again
197
+
to compile.
160
198
161
199
162
200
**Usage** ::
163
201
164
202
boussole watch
165
203
166
204
.. Note::
167
-
Default behavior is to use the Watchdog native platform observer. It may not work for all environments (like on shared directories through network or Virtual machine), in this case use the ``--poll`` to use the Watchdog polling observer instead of the default one.
168
-
169
-
Boussole has its own internal code to inspect Sass sources to be aware of sources paths it has to watch for.
170
-
171
-
In some rare circumstances inspection may lead to issues where ``compile`` command can build your sources but can fails with ``watch`` command because the latter need to inspect sources to be able to find dependencies and choke on unclear path resolution.
172
-
173
-
These unclear paths are almost allways due to some Sass libraries trying to import components using a relative path outside of itself like with ``../``. This is often the case with libraries that have been made to be included in your main scss directory.
205
+
Default behavior is to use the Watchdog native platform observer. It may not
206
+
work for all environments (like on shared directories through network or Virtual
207
+
machine), in this case use the ``--poll`` to use the Watchdog polling observer
208
+
instead of the default one.
209
+
210
+
Boussole has its own internal code to inspect Sass sources to be aware of sources
211
+
paths it has to watch for.
212
+
213
+
In some rare circumstances, some source inspection may lead to issues where ``compile``
214
+
command can build your sources but can fails with ``watch`` command because the latter
215
+
need to inspect sources to be able to find dependencies and choke on unclear path
216
+
resolution.
217
+
218
+
These unclear paths are almost allways due to some Sass libraries trying to import
219
+
components using a relative path outside of itself like with ``../``. This is often
220
+
the case with libraries that have been made to be included in your main scss directory.
0 commit comments