ghpages_generator 0.2.2
ghpages_generator: ^0.2.2 copied to clipboard
This package allows to generate gh-pages branch for Github with dartdoc and examples
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 #
- Add a
dev_dependencyin yourpubspec.yamlto ghpages_generator. - Create a Dart script to define how is built you ghpages.
create dartdoc #
Here's how is generated gh-pages for this package :
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);
}
publish web build #
If you simply want to update the gh-pages with the result of pub build web you
can run the following program :
import 'package:ghpages_generator/ghpages_generator.dart' as gh;
main() {
gh.updateWithWebOnly();
}
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
docsdirectory withwithDocs - add the
index.htmlfiles withwithIndexGeneration - add static files with
templateDir: all files in the template directory are pasted to the gh-pages branch
License #
Apache 2.0