ghpages_generator 0.3.1

  • Readme
  • Changelog
  • Installing
  • 0

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.

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate ghpages_generator

2. Use it

The package has the following executables:


$ generate_ghpages
$ generate_ghpages_with_web

Use this package as a library

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

Alternatively, your editor might support pub 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';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
--
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
--
Overall:
Weighted score of the above. [more]
0
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://dart.dev/dart-2#migration.

Maintenance issues and suggestions

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.9.0 <2.0.0