Leaflet/build/docs.js

38 lines
1.1 KiB
JavaScript
Raw Normal View History

Trying out Leafdoc comments in L.Marker Added Leafdoc comments to Layer.js Leafdoc comments for Popup, Layer Leafdoc comments: L.Evented, inheritances, minor tilelayer Leafdoc comments: gridlayer & tilelayer options Leafdoc comments: tilelayer, marker drag Typos Leafdoc: switch to shorthand method params Leafdoc: Switch to shorthands in marker drag, WMS. Leafdoc: Vector layers Leafdoc: Layer group, feature group, geojson Leafdoc: LatLng, Point, Bounds, Icons. Leafdoc: Controls. Leafdoc: DOM & utils. Leafdoc: "jake docs" now builds the documentation Leafdoc: Commit actual templates instead of symlinks Leafdoc: Fix broken build, have jake print out uglifyjs errors Leafdoc: Several L.Map bits. Leafdoc: Map handlers Leafdoc: Map events, L.CRS, misc. fixes Leafdoc: Fixed ordering of classes by using new leafdoc features Leafdoc: Misc bits at the bottom of the docs 🍂doc: Map panes 🍂doc: CRSs, projections and their templates 🍂doc: miniclasses for map methods' options Leafdoc: Cleanup L.Class, mark uninheritable sections, use Leafdoc 0.3.0 🍂doc: miniclasses for event types, bump to Leafdoc 1.0.0 🍂doc: Make linter happy after branch rebase 🍂doc: Tweaked headers for inherited stuff. 🍂doc: Tweaking section headers (white, padding, triangles) Leafdoc: upgrade to 1.2, document SVG&Canvas, and misc bits 🍂doc: minor CSS tweaks, version in filename, typo. Add missing bits - supersedes #4105, #4065, #4031 🍂doc: moved sections around, minor typos & fixes Typo about LocationEvent
2015-08-13 02:51:04 +08:00
var packageDef = require('../package.json');
function buildDocs() {
console.log('Building Leaflet documentation with Leafdoc');
var LeafDoc = require('leafdoc');
var doc = new LeafDoc({
templateDir: 'build/leafdoc-templates',
2016-04-02 20:12:02 +08:00
showInheritancesWhenEmpty: true,
leadingCharacter: '@'
Trying out Leafdoc comments in L.Marker Added Leafdoc comments to Layer.js Leafdoc comments for Popup, Layer Leafdoc comments: L.Evented, inheritances, minor tilelayer Leafdoc comments: gridlayer & tilelayer options Leafdoc comments: tilelayer, marker drag Typos Leafdoc: switch to shorthand method params Leafdoc: Switch to shorthands in marker drag, WMS. Leafdoc: Vector layers Leafdoc: Layer group, feature group, geojson Leafdoc: LatLng, Point, Bounds, Icons. Leafdoc: Controls. Leafdoc: DOM & utils. Leafdoc: "jake docs" now builds the documentation Leafdoc: Commit actual templates instead of symlinks Leafdoc: Fix broken build, have jake print out uglifyjs errors Leafdoc: Several L.Map bits. Leafdoc: Map handlers Leafdoc: Map events, L.CRS, misc. fixes Leafdoc: Fixed ordering of classes by using new leafdoc features Leafdoc: Misc bits at the bottom of the docs 🍂doc: Map panes 🍂doc: CRSs, projections and their templates 🍂doc: miniclasses for map methods' options Leafdoc: Cleanup L.Class, mark uninheritable sections, use Leafdoc 0.3.0 🍂doc: miniclasses for event types, bump to Leafdoc 1.0.0 🍂doc: Make linter happy after branch rebase 🍂doc: Tweaked headers for inherited stuff. 🍂doc: Tweaking section headers (white, padding, triangles) Leafdoc: upgrade to 1.2, document SVG&Canvas, and misc bits 🍂doc: minor CSS tweaks, version in filename, typo. Add missing bits - supersedes #4105, #4065, #4031 🍂doc: moved sections around, minor typos & fixes Typo about LocationEvent
2015-08-13 02:51:04 +08:00
});
// Note to Vladimir: Iván's never gonna uncomment the following line. He's
// too proud of the little leaves around the code.
//doc.setLeadingChar('@');
// Leaflet uses a couple of non-standard documentable things. They are not
// important enough to be classes/namespaces of their own, and should
// just be listed in a table like the rest of documentables:
doc.registerDocumentable('pane', 'Map panes');
doc.registerDocumentable('projection', 'Defined projections');
doc.registerDocumentable('crs', 'Defined CRSs');
doc.addFile('build/docs-index.leafdoc', false);
doc.addDir('src');
doc.addFile('build/docs-misc.leafdoc', false);
var out = doc.outputStr();
var fs = require('fs');
fs.writeFileSync('dist/reference-' + packageDef.version + '.html', out);
}
2016-04-02 20:12:02 +08:00
module.exports = buildDocs;