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

spmallette pushed a commit to branch TINKERPOP-2018
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 1b38ebd4f5b320a0dcecc6fa0b3047434e8cbc95
Author: Stephen Mallette <[email protected]>
AuthorDate: Tue Nov 20 14:38:13 2018 -0500

    TINKERPOP-2018 Automated documentation generation for .NET with docfx
---
 gremlin-dotnet/src/.gitignore |  3 +++
 gremlin-dotnet/src/docfx.json | 32 ++++++++++++++++++++++
 gremlin-dotnet/src/index.md   | 40 +++++++++++++++++++++++++++
 gremlin-dotnet/src/pom.xml    | 63 +++++++++++++++++++++++++++++++++++++++++++
 gremlin-dotnet/src/toc.yml    | 21 +++++++++++++++
 5 files changed, 159 insertions(+)

diff --git a/gremlin-dotnet/src/.gitignore b/gremlin-dotnet/src/.gitignore
new file mode 100644
index 0000000..9c25936
--- /dev/null
+++ b/gremlin-dotnet/src/.gitignore
@@ -0,0 +1,3 @@
+/docfx
+docfx.zip
+/_site
diff --git a/gremlin-dotnet/src/docfx.json b/gremlin-dotnet/src/docfx.json
new file mode 100644
index 0000000..9f79426
--- /dev/null
+++ b/gremlin-dotnet/src/docfx.json
@@ -0,0 +1,32 @@
+{
+  "metadata": [
+    {
+      "src": [
+        {
+          "files": [ "**/*.cs" ],
+          "exclude": [ "**/bin/**", "**/obj/**" ],
+          "src": "Gremlin.Net"
+        }
+      ],
+      "dest": "obj/api"
+    }
+  ],
+  "build": {
+    "content": [
+      {
+        "files": [ "**/*.yml" ],
+        "src": "obj/api",
+        "dest": "api"
+      },
+      {
+        "files": [ "index.md", "toc.yml" ]
+      }
+    ],
+    "globalMetadata": {
+      "_appTitle": "Apache TinkerPop - Gremlin.NET API Docs",
+      "_enableSearch": true
+    },
+    "markdownEngineName": "markdig",
+    "dest": "_site"
+  }
+}
diff --git a/gremlin-dotnet/src/index.md b/gremlin-dotnet/src/index.md
new file mode 100644
index 0000000..de80335
--- /dev/null
+++ b/gremlin-dotnet/src/index.md
@@ -0,0 +1,40 @@
+<!--
+
+ 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.
+
+-->
+
+# Gremlin.Net
+
+[Apache TinkerPop™][tk] is a graph computing framework for both graph 
databases (OLTP) and graph analytic systems
+(OLAP). [Gremlin][gremlin] is the graph traversal language of TinkerPop. It 
can be described as a functional,
+data-flow language that enables users to succinctly express complex traversals 
on (or queries of) their application's
+property graph.
+
+Gremlin.Net implements Gremlin within the C# language. It targets .NET 
Standard and can therefore be used on different
+operating systems and with different .NET frameworks, such as .NET Framework 
and .NET Core.
+
+```bash
+nuget install Gremlin.Net
+```
+
+Please see the [reference documentation][docs] at Apache TinkerPop for more 
information.
+
+[tk]: http://tinkerpop.apache.org
+[gremlin]: http://tinkerpop.apache.org/gremlin.html
+[docs]: http://tinkerpop.apache.org/docs/current/reference/#gremlin-DotNet
\ No newline at end of file
diff --git a/gremlin-dotnet/src/pom.xml b/gremlin-dotnet/src/pom.xml
index cf1fa91..029370f 100644
--- a/gremlin-dotnet/src/pom.xml
+++ b/gremlin-dotnet/src/pom.xml
@@ -93,6 +93,69 @@ limitations under the License.
                             <nugetAddEnabled>false</nugetAddEnabled>
                         </configuration>
                     </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>docfx</id>
+                                <phase>process-resources</phase>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <configuration>
+                                    <tasks>
+                                        <taskdef 
resource="net/sf/antcontrib/antcontrib.properties" />
+                                        <if>
+                                            <!-- docfx sadly requires mono and 
nuget at this time:
+                                                 1. 
https://github.com/dotnet/docfx/issues/3389 (nuget required for a dll not in 
mono
+                                                 2. 
https://github.com/dotnet/docfx/issues/718#issuecomment-256700598 (mono 
workaround) -->
+                                            <and>
+                                                <available file="mono" 
filepath="${env.PATH}"/>
+                                                <available file="${nugetExe}"/>
+                                            </and>
+                                            <then>
+                                                <if>
+                                                    <available 
file="docfx/docfx.exe"/>
+                                                    <then>
+                                                        <echo>docfx already 
downloaded.</echo>
+                                                    </then>
+
+                                                    <else>
+                                                        <exec 
executable="wget" failonerror="true">
+                                                            <arg 
line="https://github.com/dotnet/docfx/releases/download/v2.40.2/docfx.zip"/>
+                                                        </exec>
+                                                        <mkdir dir="docfx"/>
+                                                        <exec 
executable="unzip" failonerror="true">
+                                                            <arg 
line="docfx.zip -d docfx"/>
+                                                        </exec>
+                                                        <delete 
file="docfx.zip"/>
+                                                        <exec 
executable="mono" failonerror="true">
+                                                            <arg 
line="${nugetExe} install -OutputDirectory docfx SQLitePCLRaw.core 
-ExcludeVersion"/>
+                                                        </exec>
+                                                        <copy 
file="docfx/SQLitePCLRaw.core/lib/net45/SQLitePCLRaw.core.dll" todir="docfx"/>
+                                                    </else>
+                                                </if>
+                                                <exec executable="mono" 
failonerror="true">
+                                                    <arg 
line="docfx/docfx.exe"/>
+                                                </exec>
+                                            </then>
+                                            <else>
+                                                <echo>Skipping docfx 
generation as mono is not available</echo>
+                                            </else>
+                                        </if>
+                                    </tasks>
+                                </configuration>
+                            </execution>
+                        </executions>
+                        <dependencies>
+                            <dependency>
+                                <groupId>ant-contrib</groupId>
+                                <artifactId>ant-contrib</artifactId>
+                                <version>20020829</version>
+                            </dependency>
+                        </dependencies>
+                    </plugin>
                 </plugins>
             </build>
         </profile>
diff --git a/gremlin-dotnet/src/toc.yml b/gremlin-dotnet/src/toc.yml
new file mode 100644
index 0000000..40ce1ab
--- /dev/null
+++ b/gremlin-dotnet/src/toc.yml
@@ -0,0 +1,21 @@
+# 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.
+
+- name: Home
+  href: index.md
+- name: API Documentation
+  href: obj/api/

Reply via email to