Coder Social home page Coder Social logo

azlir / peanut.dart Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kevmoo/peanut.dart

0.0 0.0 0.0 244 KB

Easily build and deploy your Dart web app to GitHub pages

Home Page: https://pub.dev/packages/peanut

License: BSD 3-Clause "New" or "Revised" License

Dart 99.58% HTML 0.42%

peanut.dart's Introduction

Pub Package CI

Run flutter build web or dart pub run build_runner build and put the output in another branch. An easy way to update gh-pages.

Install

$ dart pub global activate peanut

or

$ flutter pub global activate peanut

Run

$ peanut

or

$ flutter pub global run peanut

This will build your project into a temporary directory, and then it will update the local gh-pages branch with the build output.

Read more about peanut in this article.

Options

$ 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.

          [auto] (default)       Use the HTML renderer on mobile devices, and
                                 CanvasKit on desktop devices.
          [canvaskit]            This renderer uses WebGL and WebAssembly to
                                 render graphics.
          [html]                 This renderer uses a combination of HTML, CSS,
                                 SVG, 2D Canvas, and WebGL.

    --extra-args                 Extra arguments to provide to the target CLI
                                 within a single string.
                                 Examples:
                                 --extra-args "--dart-define TEST_VAR=123"
                                 --extra-args "--dart-define --base-href=/base/"
-h, --help                       Prints usage information.
    --version                    Print the current version.

Configuration file

peanut also supports a configuration file. Convenient if you have one-off settings you'd rather not type every time you deploy.

The peanut.yaml from this repository:

# Configuration for https://pub.dev/packages/peanut
directories:
  - example

Examples

Git tricks

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 server.

$ git update-ref refs/heads/gh-pages origin/gh-pages

This is also useful if you want to undo a peanut run.

Publishing automation

For information about our publishing automation and release process, see https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

peanut.dart's People

Contributors

kevmoo avatar dependabot[bot] avatar filiph avatar azlir avatar denniskaselow avatar johnpryan avatar kasperpeulen avatar mjohnsullivan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.