ghpages_generator 0.3.1

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 55

Dart Gh-Pages Generator

This project allows to create/update the gh-pages branch based on examples, dartdoc, docs, web and/or custom files.

Basically a new commit is done in the gh-pages branch with updated files generated. Then you only need to push this branch on github.

Usage

Running it

The package exposes a simple command-line wrapper around the core generating library. The easiest way to invoke it is to globally activate the package and let pub put its executable on your path:

$ pub global activate ghpages_generator
$ generate_ghpages ...

If you don't want generate_ghpages on your path, you can run it explicitly:

$ pub global activate ghpages_generator --no-executables
$ pub global run ghpages_generator:generate ...

update with web

# update the gh-pages branch with the result of `pub build web`
$> generate_ghpages_with_web

custom

You can use generate_ghpages with several options/flags to update the gh-pages (See generate_ghpages -h).

If you need more fine controls on the generation you have to use the api as described bellow.

Using the API

  1. Add a dev_dependency in your pubspec.yaml to ghpages_generator.
  2. Create a Dart script to define how is built you ghpages.

create dartdoc

Here's how is generated gh-pages for this package](http://a14n.github.io/dart-ghpages-generator) :

import 'package:ghpages_generator/ghpages_generator.dart' as gh;

main() {
  new gh.Generator()
      ..setDartDoc(['lib/ghpages_generator.dart'], includeSdk: false,
          excludedLibs: ['path'], startPage: 'ghpages_generator')
      ..generate(doCustomTask: gh.moveDartDocAtRoot);
}

Actions

Here's the available actions :

  • generate the dartdoc with setDartDoc
  • compile and deploy the example directory with withExamples
  • compile and deploy the web directory with withWeb
  • add the docs directory with withDocs
  • add the index.html files with withIndexGeneration
  • add static files with templateDir : all files in the template directory are pasted to the gh-pages branch

License

Apache 2.0

v0.3.1 (2018-01-17)

Widen args dependency to include 1.x.x.

v0.3.0 (2015-05-18)

Use path.current instead of Platform.script as default dir for root-dir to work with pub global run.

v0.2.5 (2015-05-12)

Wider args dependency.

v0.2.4 (2015-01-12)

Provide executables for pub globally activation.

v0.2.3 (2015-01-12)

Ignore .pub.

v0.2.2 (2014-09-01)

Switch to the new deferred loading syntax (needs DartSDK >= 1.6).

v0.2.1 (2014-07-18)

Add a generator of index.html files with withIndexGeneration.

v0.2.0 (2014-07-11)

Add utility functions to simplify the publication of examples at root with :

  new gh.Generator()
      ..withExamples = true
      ..generate(doCustomTask: gh.moveExampleAtRoot);

breaking change

setExamples has been replaced by withExamples.

v0.1.2 (2014-07-11)

Use git -f add to avoid problem with global .gitignore containing packages

v0.1.1 (2014-05-09)

Add utility functions to simplify the publication of dartdoc at root with :

  new gh.Generator()
      ..setDartDoc(['lib/ghpages_generator.dart'], includeSdk: false,
          excludedLibs: ['path'], startPage: 'ghpages_generator')
      ..generate(doCustomTask: gh.moveDartDocAtRoot);

Semantic Version Conventions

http://semver.org/

  • Stable: All even numbered minor versions are considered API stable: i.e.: v1.0.x, v1.2.x, and so on.
  • Development: All odd numbered minor versions are considered API unstable: i.e.: v0.9.x, v1.1.x, and so on.

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  ghpages_generator: "^0.3.1"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:ghpages_generator/ghpages_generator.dart';
        
Version Uploaded Documentation Archive
0.3.1 Jan 17, 2018 Go to the documentation of ghpages_generator 0.3.1 Download ghpages_generator 0.3.1 archive
0.3.0 May 18, 2015 Go to the documentation of ghpages_generator 0.3.0 Download ghpages_generator 0.3.0 archive
0.2.5 May 12, 2015 Go to the documentation of ghpages_generator 0.2.5 Download ghpages_generator 0.2.5 archive
0.2.4 Jan 12, 2015 Go to the documentation of ghpages_generator 0.2.4 Download ghpages_generator 0.2.4 archive
0.2.3 Jan 12, 2015 Go to the documentation of ghpages_generator 0.2.3 Download ghpages_generator 0.2.3 archive
0.2.2 Sep 1, 2014 Go to the documentation of ghpages_generator 0.2.2 Download ghpages_generator 0.2.2 archive
0.2.1 Jul 18, 2014 Go to the documentation of ghpages_generator 0.2.1 Download ghpages_generator 0.2.1 archive
0.2.0 Jul 11, 2014 Go to the documentation of ghpages_generator 0.2.0 Download ghpages_generator 0.2.0 archive
0.1.2 Jul 11, 2014 Go to the documentation of ghpages_generator 0.1.2 Download ghpages_generator 0.1.2 archive
0.1.1 May 9, 2014 Go to the documentation of ghpages_generator 0.1.1 Download ghpages_generator 0.1.1 archive

All 15 versions...

Analysis

This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Feb 3, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
11 / 100
Health:
Code health derived from static analysis. [more]
100 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
55

Platforms

Detected platforms: Flutter, other

Primary library: package:ghpages_generator/ghpages_generator.dart with components: io.

Suggestions

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use ghpages_generator.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.9.0 <2.0.0
args >=0.12.0 <2.0.0 1.3.0
path >=1.0.0 <2.0.0 1.5.1