diff options
author | anekos | 2009-02-04 13:53:52 +0000 |
---|---|---|
committer | anekos | 2009-02-04 13:53:52 +0000 |
commit | 895b91aec3a8ed195cd04d007627e4702abb39a1 (patch) | |
tree | e3d7968becbc5d57aaa1adea5118944ca7859b48 | |
parent | 87273259825c1d137bc1e280867a7853302c299b (diff) | |
download | vimperator-plugins-895b91aec3a8ed195cd04d007627e4702abb39a1.tar.bz2 |
all.html を出力するようにしてみた
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@29544 d0d07461-0603-4401-acd4-de1884942a52
-rw-r--r-- | PMWriter.js | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/PMWriter.js b/PMWriter.js index df87a62..73d1d6a 100644 --- a/PMWriter.js +++ b/PMWriter.js @@ -63,6 +63,7 @@ let files = io.readDirectory(pluginDirPath); let indexHtml = <></>; + let allHtml = <></>; files.forEach(function (file) { if (!/\.js$/.test(file.path)) @@ -122,15 +123,7 @@ // プラグイン毎のドキュメント { - io.writeFile( - io.getFile(outputDir + htmlFilename), - <html> - <head> - <title>{plugin.info.name.toString()}</title> - <link rel="stylesheet" href="plugin.css" type="text/css" /> - <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> - </head> - <body> + let body = <div> <div class="information" id="information"> <h1>{plugin.info.name.toString()}</h1> <div> @@ -153,9 +146,22 @@ </div> </div> <div class="detail" id="detail">{plugin.info.detail}</div> + </div>; + + io.writeFile( + io.getFile(outputDir + htmlFilename), + <html> + <head> + <title>{plugin.info.name.toString()}</title> + <link rel="stylesheet" href="plugin.css" type="text/css" /> + <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> + </head> + <body> + {body} </body> </html>.toString() ); + allHtml += body; } // index.html @@ -217,7 +223,19 @@ </body> </html>; + allHtml = <html> + <head> + <title>All Plugins</title> + <link rel="stylesheet" href="plugin.css" type="text/css" /> + <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> + </head> + <body> + {allHtml} + </body> + </html>.toString(); + io.writeFile(io.getFile(outputDir + 'index.html'), indexHtml.toString()); + io.writeFile(io.getFile(outputDir + 'all.html'), allHtml.toString()); } commands.addUserCommand( |