diff --git a/.cfformat.json b/.cfformat.json new file mode 100644 index 0000000..156ae0d --- /dev/null +++ b/.cfformat.json @@ -0,0 +1,79 @@ +{ + "alignment.consecutive.assignments":false, + "alignment.consecutive.params":false, + "alignment.consecutive.properties":false, + "alignment.doc_comments":true, + "array.empty_padding":false, + "array.multiline.comma_dangle":false, + "array.multiline.element_count":4, + "array.multiline.leading_comma":false, + "array.multiline.leading_comma.padding":false, + "array.multiline.min_length":40, + "array.padding":true, + "binary_operators.newline_indent":false, + "binary_operators.padding":true, + "brackets.padding":true, + "comment.asterisks":"align", + "for_loop_semicolons.padding":true, + "function_anonymous.empty_padding":false, + "function_anonymous.group_to_block_spacing":"spaced", + "function_anonymous.multiline.comma_dangle":false, + "function_anonymous.multiline.element_count":4, + "function_anonymous.multiline.leading_comma":false, + "function_anonymous.multiline.leading_comma.padding":true, + "function_anonymous.multiline.min_length":40, + "function_anonymous.padding":false, + "function_anonymous.spacing_to_group":false, + "function_call.casing.builtin":"cfdocs", + "function_call.casing.userdefined":"ignored", + "function_call.empty_padding":false, + "function_call.multiline.comma_dangle":false, + "function_call.multiline.element_count":4, + "function_call.multiline.leading_comma":false, + "function_call.multiline.leading_comma.padding":true, + "function_call.multiline.min_length":40, + "function_call.padding":true, + "function_declaration.empty_padding":false, + "function_declaration.group_to_block_spacing":"spaced", + "function_declaration.multiline.comma_dangle":false, + "function_declaration.multiline.element_count":4, + "function_declaration.multiline.leading_comma":false, + "function_declaration.multiline.leading_comma.padding":true, + "function_declaration.multiline.min_length":40, + "function_declaration.padding":true, + "function_declaration.spacing_to_group":false, + "indent_size":4, + "keywords.block_to_keyword_spacing":"spaced", + "keywords.empty_group_spacing":false, + "keywords.group_to_block_spacing":"spaced", + "keywords.padding_inside_group":true, + "keywords.spacing_to_block":"spaced", + "keywords.spacing_to_group":false, + "max_columns":1000, + "metadata.key_value.padding":true, + "metadata.multiline.element_count":4, + "metadata.multiline.min_length":40, + "method_call.chain.multiline":10, + "newline":"os", + "param.key_value.padding":true, + "param.multiline.element_count":4, + "param.multiline.min_length":40, + "parentheses.padding":true, + "property.key_value.padding":true, + "property.multiline.element_count":4, + "property.multiline.min_length":40, + "strings.attributes.quote":"double", + "strings.convertNestedQuotes":true, + "strings.quote":"double", + "struct.empty_padding":false, + "struct.multiline.comma_dangle":false, + "struct.multiline.element_count":4, + "struct.multiline.leading_comma":false, + "struct.multiline.leading_comma.padding":true, + "struct.multiline.min_length":40, + "struct.padding":true, + "struct.quote_keys":false, + "struct.separator":": ", + "tab_indent":true, + "tags.lowercase":true +} \ No newline at end of file diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 0000000..b289e12 --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,43 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["master"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + # Upload entire repository + path: './docs' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 diff --git a/Application.cfc b/Application.cfc new file mode 100644 index 0000000..b09e475 --- /dev/null +++ b/Application.cfc @@ -0,0 +1,6 @@ +component displayname = "Application" output = "false" hint = "Handle the application" { + + this.charset.web = "UTF-8"; + this.charset.resource = "UTF-8"; + +} diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..276facc --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2023 Claudio Andreas Rüger at https://www.rhein-berg-digital.de + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..200b344 --- /dev/null +++ b/README.md @@ -0,0 +1,153 @@ +# HtmlHelper.cfc + +--- + +***Minify your CFML generated HTML at runtime!*** + +## A simple basic CFML component to + +> - **minify CFML generated html** content +> - **encode trusted HTML** content containing non-compliant/unescaped characters like e.g. €, ü, ö, ß, etc. within a tags inner HTML + +### 1. minifyHtml( string html required ) + +#### Converts a whitespace poluted HTML block like this + + +
+Hello to all CFML devs 😀 🤩 around the 🌎!!!
+