Skip to content

Commit

Permalink
Modified README.md and added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin De Keyser committed Oct 27, 2022
1 parent 3018d72 commit e1ea09e
Show file tree
Hide file tree
Showing 33 changed files with 11,249 additions and 36 deletions.
26 changes: 10 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
# Flutter app docset generation
# Flutter docset generator script

This is a slightly modified standard Flutter repo with a build.sh tool that generates a Dash compatible .docset documentation for the flutter app.
This is a slightly modified standard Flutter repo with a [build.sh](./build.sh) tool that generates [docset](https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/Documentation_Sets/010-Overview_of_Documentation_Sets/docset_overview.html#//apple_ref/doc/uid/TP40005266-CH13-SW6) documentation for the Flutter app.

Check out [build.sh] for more details.
Docset is used by [Dash](https://kapeli.com/dash) and [Zeal](https://zealdocs.org) among others.

# Install requirements
# Install requirements / dependencies
This script uses [dashing](https://github.com/technosophos/dashing), [jq](https://stedolan.github.io/jq) and [yq](https://github.com/mikefarah/yq).
Optionally, python3 is needed with the [Pillow](https://pypi.org/project/Pillow/) package for resizing the image based on the iOS AppIcon of the current app.

You can install them using:
```
brew install dashing jq yq
# Optional for image resizing:
brew install python3
pip3 install Pillow
```

# Install instructions for optional flutter-stylizer:

```brew install go```
Add the following 3 lines to your .zshrc (or .bashrc if you're using bash)
```
export GOPATH=${HOME}/go
PATH=${PATH}:${HOME}/go/bin
mkdir -p ${HOME}/go/bin
```
Finally, install using:
`go get -u github.com/gmlewis/go-flutter-stylizer/cmd/flutter-stylizer`
25 changes: 5 additions & 20 deletions build.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,32 +1,19 @@
#!/bin/sh

# This script additionally needs:
# This script additionally to flutter/dart needs:
# brew install dashing jq yq
# [Optional]
# For image resizing:
# [Optional] For image resizing:
# pip3 install Pillow
# Install instructions for flutter-stylizer:
# brew install go
# Add the following 3 lines to your .zshrc (or .bashrc if you're using bash)
#
# export GOPATH=${HOME}/go
# PATH=${PATH}:${HOME}/go/bin
# mkdir -p ${HOME}/go/bin
#
# Finally, install using: go get -u github.com/gmlewis/go-flutter-stylizer/cmd/flutter-stylizer

# Install/Update plugins
flutter pub get

# [Essential] Run code generation
flutter pub run build_runner build --delete-conflicting-outputs
# If your project uses code generation:
# flutter pub run build_runner build --delete-conflicting-outputs

# Format the code, should be done on saving by IDE.
flutter format .

# [Optional] Stylize flutter if installed: https://github.com/gmlewis/go-flutter-stylizer
flutter-stylizer lib/...

# Run tests
flutter test

Expand Down Expand Up @@ -149,7 +136,6 @@ cd ..
# [OPTIONAL] Set the docset language to dartlang.
cat > preprocessing.dart <<- EOM
import 'dart:io';
import 'package:args/args.dart';
/// This changes the DocSetPlatformFamily key to be "dartlang" instead of the
/// name of the package (usually "flutter").
Expand Down Expand Up @@ -177,12 +163,11 @@ void main(List<String> args) {
}
EOM

dart preprocessing.dart "$FLUTTERNAME.docset"
dart run preprocessing.dart "$FLUTTERNAME.docset"

cd ..

# [OPTIONAL] Clean
rm resize.py
rm doc/preprocessing.dart
rm doc/api/dashing.json

19 changes: 19 additions & 0 deletions doc/flutterdashdocumentation.docset/Contents/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string>flutterdashdocumentation</string>
<key>CFBundleName</key>
<string>flutterdashdocumentation</string>
<key>DocSetPlatformFamily</key>
<string>dartlang</string>
<key>isDashDocset</key>
<true/>
<key>DashDocSetFamily</key>
<string>dashtoc</string>
<key>dashIndexFilePath</key>
<string>index.html</string>
<key>isJavaScriptEnabled</key><false/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<!DOCTYPE html><html lang="en"><head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no"/>
<meta name="generator" content="made with love by dartdoc 6.0.0"/>
<meta name="description" content="flutterdashdocumentation API docs, for the Dart programming language."/>
<title>flutterdashdocumentation - Dart API docs</title>



<link rel="preconnect" href="https://fonts.gstatic.com"/>
<link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&amp;display=swap" rel="stylesheet"/>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"/>

<link rel="stylesheet" href="static-assets/github.css?v1"/>
<link rel="stylesheet" href="static-assets/styles.css?v1"/>
<link rel="icon" href="static-assets/favicon.png?v1"/>


</head>


<body data-base-href="" data-using-base-href="false">

<div id="overlay-under-drawer"></div>

<header id="title">
<button id="sidenav-left-toggle" type="button">&nbsp;</button>
<ol class="breadcrumbs gt-separated dark hidden-xs">
<li class="self-crumb">flutterdashdocumentation package</li>
</ol>
<div class="self-name">flutterdashdocumentation</div>
<form class="search navbar-right" role="search">
<input type="text" id="search-box" autocomplete="off" disabled="" class="form-control typeahead" placeholder="Loading search..."/>
</form>
</header>

<main>


<div id="dartdoc-main-content" class="main-content">
<h1>404: Something&#39;s gone wrong :-(</h1>

<section class="desc">
<p>You&#39;ve tried to visit a page that doesn&#39;t exist. Luckily this site
has other <a href="index.html">pages</a>.</p>
<p>If you were looking for something specific, try searching:
</p><form class="search-body" role="search">
<input type="text" id="search-body" autocomplete="off" disabled="" class="form-control typeahead" placeholder="Loading search..."/>
</form>
<p></p>

</section>
</div> <!-- /.main-content -->

<div id="dartdoc-sidebar-left" class="sidebar sidebar-offcanvas-left">
<header id="header-search-sidebar" class="hidden-l">
<form class="search-sidebar" role="search">
<input type="text" id="search-sidebar" autocomplete="off" disabled="" class="form-control typeahead" placeholder="Loading search..."/>
</form>
</header>

<ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav">
<li class="self-crumb">flutterdashdocumentation package</li>
</ol>


<h5><span class="package-name">flutterdashdocumentation</span> <span class="package-kind">package</span></h5>
<ol>
<li class="section-title">Libraries</li>
<li><a href="commented_floating_action_button/commented_floating_action_button-library.html">commented_floating_action_button</a></li>
<li><a href="main/main-library.html">main</a></li>
</ol>

</div>

<div id="dartdoc-sidebar-right" class="sidebar sidebar-offcanvas-right">
</div>

</main>

<footer>
<span class="no-break">
flutterdashdocumentation
1.0.0+1
</span>


</footer>



<script src="static-assets/highlight.pack.js?v1"></script>
<script src="static-assets/docs.dart.js"></script>







</body></html>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Loading

0 comments on commit e1ea09e

Please sign in to comment.