Do you ever want to
pub run build_runner build into another branch? This is
$ pub global activate peanut
$ cd ~/my_dart_proj/ $ peanut
This will build your project into a temporary directory, and then it will update
gh-pages branch with its contents.
Flutter apps can be built by running peanut with the Flutter SDK.
$ flutter pub global activate peanut
$ flutter pub global run peanut:peanut
Read me about
$ peanut --help Usage: peanut [<args>] Arguments: -d, --directories The directories that should be built. (defaults to "web") -b, --branch The git branch where the built content should be committed. (defaults to "gh-pages") -c, --build-config The configuration to use when running `build_runner`. --[no-]release Flutter: enabled passes `--release`, otherwise passes `--profile`. Other: enabled passes `--release`, otherwise passes `--no-release`. (defaults to on) -m, --message (defaults to "Built <directories>") --[no-]source-branch-info Includes the name of the source branch and SHA in the commit message (defaults to on) --post-build-dart-script Optional Dart script to run after all builds have completed, but before files are committed to the repository. --builder-options Builder options YAML or a path to a file containing builder options YAML. See the README for details. --[no-]verbose Print more details when running. --dry-run Verifies configuration and prints commands that would be executed, but does not do any work. --web-renderer The renderer implementation to use when building for the web. Flutter web only. [canvaskit] This renderer uses WebGL and WebAssembly to render graphics. [html] (default) This renderer uses a combination of HTML, CSS, SVG, 2D Canvas, and WebGL. -h, --help Prints usage information. --version Print the current version.
You can also configure
peanut with a configuration file. Convenient if you
have one-off settings you'd rather not time you deploy.
peanut.yaml from this repository:
# Configuration for https://pub.dev/packages/peanut directories: - example
- Output: https://dart-lang.github.io/sample-pop_pop_win/
- No custom configuration.
- Output: http://kevmoo.github.io/pubviz/
peanut.yamlfile to specify
exampleas the source directory.
- Output: https://flutter.github.io/samples/
peanut.yamlfile to specify
builder-options, multiple source directories, and a custom post-build file.
The easiest way to push your
gh-pages branch to github (without switching from
your working branch) is:
$ git push origin --set-upstream gh-pages
To create (or update) your local
gh-pages branch to match what's on the
$ git update-ref refs/heads/gh-pages origin/gh-pages
This is also useful if you want to undo a