Add .editorconfig file to Bedrock

This commit is contained in:
Alex Gibson 2014-03-10 10:50:20 +00:00
Родитель b8780b5743
Коммит a83904f016
2 изменённых файлов: 43 добавлений и 2 удалений

33
.editorconfig Normal file
Просмотреть файл

@ -0,0 +1,33 @@
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
[*.py]
indent_size = 4
[*.js]
indent_size = 4
[*.json]
indent_size = 4
[*.css]
indent_size = 4
[*.less]
indent_size = 4
[*.html]
indent_size = 2
# Matches the exact files package.json and .travis.yml
[{package.json, .travis.yml}]
indent_size = 2

Просмотреть файл

@ -42,7 +42,7 @@ media()
^^^^^^^^^^^
For a simple image, the `media()` function is used to generate the image URL. For example::
<img src="{{ media('img/firefox/new/firefox-logo.png') }}" alt="Firefox" />
<img src="{{ media('img/firefox/new/firefox-logo.png') }}" alt="Firefox" />
will output an image::
@ -66,7 +66,7 @@ l10n_img()
^^^^^^^^^^
Images that have translatable text can be handled with `l10n_img()`::
<img src="{{ l10n_img('firefox/os/have-it-all/messages.jpg') }}" />
<img src="{{ l10n_img('firefox/os/have-it-all/messages.jpg') }}" />
The images referenced by `l10n_img()` must exist in `media/img/l10n/`, so for above example, the images could include `media/img/l10n/en-US/firefox/os/have-it-all/messages.jpg` and `media/img/l10n/es-ES/firefox/os/have-it-all/messages.jpg`.
@ -128,3 +128,11 @@ CSS Style
See the `Mozilla CSS Style Guide
<http://mozweb.readthedocs.org/en/latest/css-style.html>`_.
Configuring your code editor
----------------------------
Bedrock includes an `.editorconfig` file in the root directory that you can
use with your code editor to help maintain consistent coding styles. Please
see `editorconfig.org<http://editorconfig.org/>`_. for a list of supported
editors and available plugins.