This is an automated email from the ASF dual-hosted git repository.

joshtynjala pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/royale-docs.git

commit 1af188555eaf3b846571aeea087f309d8c6ddfa5
Author: Josh Tynjala <[email protected]>
AuthorDate: Tue Sep 27 08:24:54 2022 -0700

    formatter
---
 _data/toc.json                 |  9 ++++++--
 formatter.md                   | 43 +++++++++++++++++++++++++++++++++++
 formatter/formatter-options.md | 51 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 101 insertions(+), 2 deletions(-)

diff --git a/_data/toc.json b/_data/toc.json
index b370e67..13098d4 100644
--- a/_data/toc.json
+++ b/_data/toc.json
@@ -243,9 +243,14 @@
             "children": [
                 {
                     "path": "compiler/compiler-options.md"
-                },
+                }
+            ]
+        },
+        {
+            "path": "formatter.md",
+            "children": [
                 {
-                    "path": "compiler/compiler-arguments.md"
+                    "path": "formatter/formatter-options.md"
                 }
             ]
         },
diff --git a/formatter.md b/formatter.md
new file mode 100644
index 0000000..11ebeb4
--- /dev/null
+++ b/formatter.md
@@ -0,0 +1,43 @@
+---
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+layout: docpage
+title: Formatter
+description: Using the Royale formatter with ActionScript and MXML
+permalink: /formatter
+---
+
+# Apache Royale Formatter
+
+Format your _.as_ and _.mxml_ source files
+
+## User Guide
+
+Below are some pointers to help you get started with the Royale formatter in 
various environments.
+
+### Command line
+
+The _bin_ directory of the Royale SDK should contain the **asformat** script 
that will launch the formatter. Use `asformat --help` to see the [list of 
available formatter options](formatter/formatter-options).
+
+### IDEs
+
+Consult your IDE documentation for how to use the Royale formatter.
+
+## Formatter Options
+
+The Royale formatter provides a number of command line options to customize 
its use. You can find the list of formatter options here:
+
+- [Formatter Options](formatter/formatter-options)
diff --git a/formatter/formatter-options.md b/formatter/formatter-options.md
new file mode 100644
index 0000000..fcd8293
--- /dev/null
+++ b/formatter/formatter-options.md
@@ -0,0 +1,51 @@
+---
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+layout: docpage
+title: Formatter Options
+description: List of available formatter options
+permalink: /formatter/formatter-options
+---
+
+# Formatter Options
+
+List of all available formatter options
+
+This list may be generated by running `asformat -help advanced` in a terminal.
+
+- `-collapse-empty-blocks` -- Determines if empty blocks containing no 
statements will be collapsed to a single line, or if the closing curly brace 
should still appear on a new line.
+- `-help` `[keyword]` `[...]` -- Displays formatter usage instructions.
+- `-ignore-parsing-problems` -- If enabled, parsing errors will be ignored. 
This may result in undesirable effects on formatting.
+- `-insert-final-new-line` -- Determines if the file must have at least one 
final new line.
+- `-insert-space-anonymous-function-keyword` -- Determines if a space should 
appear between `function` and the opening parenthesis.
+- `-insert-space-binary-operators` -- Determines if spaces should appear 
before and after binary operators, such as `+`, `==`, and `&&`.
+- `-insert-space-comma-delimiter` -- Determines if a space should be inserted 
after a comma when used as a delimter (such as an object and array literals).
+- `-insert-space-control-flow-keywords` -- Determines if a space should appear 
between control flow keywords, such as `if`, `for` and `while`, and the opening 
parenthesis.
+- `-insert-space-for-loop-semicolon` -- Determines if a space should appear 
after each semicolon in a `for` loop.
+- `-insert-space-line-comment` -- Determines if a single space should appear 
at the beginning of a line comment.
+- `-insert-space-meta-attributes` -- Determines if a space should appear after 
metadata attributes.
+- `-insert-spaces` -- Insert spaces for indentation.
+- `-list-files` -- List files to standard output if they have formatting 
changes.
+- `-load-config` `<filename>` -- Loads an XML configuration file with more 
formatter options.
+- `-max-preserve-new-lines` `<int>` -- The maximum number of empty new lines 
to preserve between lines of code.
+- `-mxml-align-attributes` -- When MXML attributes are on separate lines, 
align them at the start.
+- `-mxml-insert-new-line-attributes` -- Determines if each MXML attribute 
should appear on a new line.
+- `-open-brace-new-line` -- Determines if an opening curly brace should appear 
on a new line or not.
+- `-semicolons` `<string>` -- Determines how to handle semicolons at the end 
of statements. Possible values are `ignore`, `insert`, or `remove`
+- `-skip-local-config-file` -- Ignores _asformat-config.xml_ in the current 
working directory, if it exists.
+- `-tab-size` `<int>` -- Sets the width of tab characters.
+- `-version` -- Displays the version number of the formatter tool.
+- `-write-files` -- Write changes to files that have been formatted.
\ No newline at end of file

Reply via email to