Ver Fonte

Update git/editor config files for repo and project templates (#427)

Provide better developer tool boilerplate in project templates (and the main repo!)
* Updated the gitattribute files to better reflect common file types.
* Added editorconfig files as we normally use those in all our repos.

Documentation
* Updated release notes.

No tests needed as these are dev tooling config files.
Vince Salvino há 3 anos atrás
pai
commit
d7e45ed5ea

+ 26 - 0
.editorconfig

@@ -0,0 +1,26 @@
+# EditorConfig is awesome: https://EditorConfig.org
+#
+# EditorConfig helps keep your files clean and uniform by specifying tabs vs
+# spaces, file encodings, etc. Download a plugin for your editor:
+# https://editorconfig.org/#download
+
+# top-most EditorConfig file
+root = true
+
+# Save files in UTF-8, with Unix-style newlines, with a blank line at the end,
+# and trim any rogue whitespace (e.g. spaces, tabs at the end of lines.)
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+# Use 4 spaced for indentation.
+[*.{md,py,rst}]
+indent_style = space
+indent_size = 4
+
+# Use 2 spaces for indentation.
+[*.{css,sass,scss,html,js,json,ts,yml}]
+indent_style = space
+indent_size = 2

+ 14 - 15
.gitattributes

@@ -1,15 +1,14 @@
-# Set the default line ending behavior.
-* text eol=lf
-
-# Explicitly declare text files you want to always be normalized and converted
-# to native line endings on checkout.
-*.py text
-*.html text
-*.js text
-*.css text
-*.json text
-
-# Denote all files that are truly binary and should not be modified.
-*.png binary
-*.jpg binary
-*.gif binary
+# Explicitly declare text files that should always be normalized and converted
+# to unix line endings, to reduce cross-platform development issues.
+*.css text eol=lf
+*.html text eol=lf
+*.js text eol=lf
+*.json text eol=lf
+*.md text eol=lf
+*.py text eol=lf
+*.rst text eol=lf
+*.sass text eol=lf
+*.scss text eol=lf
+*.ts text eol=lf
+*.txt text eol=lf
+*.yml text eol=lf

+ 26 - 0
coderedcms/project_template/basic/.editorconfig

@@ -0,0 +1,26 @@
+# EditorConfig is awesome: https://EditorConfig.org
+#
+# EditorConfig helps keep your files clean and uniform by specifying tabs vs
+# spaces, file encodings, etc. Download a plugin for your editor:
+# https://editorconfig.org/#download
+
+# top-most EditorConfig file
+root = true
+
+# Save files in UTF-8, with Unix-style newlines, with a blank line at the end,
+# and trim any rogue whitespace (e.g. spaces, tabs at the end of lines.)
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+# Use 4 spaced for indentation.
+[*.{md,py,rst}]
+indent_style = space
+indent_size = 4
+
+# Use 2 spaces for indentation.
+[*.{css,sass,scss,html,js,json,ts,yml}]
+indent_style = space
+indent_size = 2

+ 7 - 2
coderedcms/project_template/basic/.gitattributes

@@ -1,9 +1,14 @@
 # Explicitly declare text files that should always be normalized and converted
 # to unix line endings, to reduce cross-platform development issues.
-*.py text eol=lf
+*.css text eol=lf
 *.html text eol=lf
 *.js text eol=lf
-*.css text eol=lf
 *.json text eol=lf
 *.md text eol=lf
+*.py text eol=lf
 *.rst text eol=lf
+*.sass text eol=lf
+*.scss text eol=lf
+*.ts text eol=lf
+*.txt text eol=lf
+*.yml text eol=lf

+ 26 - 0
coderedcms/project_template/sass/.editorconfig

@@ -0,0 +1,26 @@
+# EditorConfig is awesome: https://EditorConfig.org
+#
+# EditorConfig helps keep your files clean and uniform by specifying tabs vs
+# spaces, file encodings, etc. Download a plugin for your editor:
+# https://editorconfig.org/#download
+
+# top-most EditorConfig file
+root = true
+
+# Save files in UTF-8, with Unix-style newlines, with a blank line at the end,
+# and trim any rogue whitespace (e.g. spaces, tabs at the end of lines.)
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+# Use 4 spaced for indentation.
+[*.{md,py,rst}]
+indent_style = space
+indent_size = 4
+
+# Use 2 spaces for indentation.
+[*.{css,sass,scss,html,js,json,ts,yml}]
+indent_style = space
+indent_size = 2

+ 7 - 2
coderedcms/project_template/sass/.gitattributes

@@ -1,9 +1,14 @@
 # Explicitly declare text files that should always be normalized and converted
 # to unix line endings, to reduce cross-platform development issues.
-*.py text eol=lf
+*.css text eol=lf
 *.html text eol=lf
 *.js text eol=lf
-*.css text eol=lf
 *.json text eol=lf
 *.md text eol=lf
+*.py text eol=lf
 *.rst text eol=lf
+*.sass text eol=lf
+*.scss text eol=lf
+*.ts text eol=lf
+*.txt text eol=lf
+*.yml text eol=lf

+ 4 - 0
docs/releases/v0.21.0.rst

@@ -15,6 +15,10 @@ New features
   used by the new tracking settings and is useful for implementing code-oriented
   fields.
 
+* Improve developer tooling in new CodeRed CMS sites by providing pre-configured
+  ``.gitattribute`` and ``.editorconfig`` files.
+
+
 Upgrade considerations
 ----------------------