-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
Yung-Sheng Lu edited this page Nov 4, 2017
·
5 revisions
[TOC]
- Download Node.js and install on your working environment.
- Dependencies of
gulp
as global.npm install gulp -g
(Wait until beta version release!)
- You can see the
./demo
directory in the repository. (the demo to use docoGen in your computer)- An example on Linux or Mac platform.
- The first time execution will take a few minutes to install some packages.
Notice: Linux can't support Chinese package!
- Clone from GitHub.
$ git clone https://github.com/toolbuddy/docoGen-WebUI
- Install from npm.
$ npm install docogen-webui --save
- Import the module in your code.
const docogen_web = require('docogen-webui');
- Function
generate_html_ex
-
src_path
: the source path to your project root, and it will get all docoGen files (.docogen
). -
dst_path
: the destination directory to store those generated web page.
// Convert docogen to web page (HTML format), with absolute path docogen_web.generate_html_ex(src_path, dst_path, function(err, msg) { console.log(msg); });
-
Using the file extension which named
.docogen
, and just store JSON format in it.
- These files treated as configuration dependency to your generated result.
- More information (Still working on it, see
./demo/script/
to see current support)
- Execution
$ node yourcode.js
- Within docoGen-WebUI running, the terminal will output some message about Gulp tasks.
Have 8 files. [17:46:32] Working directory changed to ~/Project/docoGen-html-ui [17:46:32] Working directory changed to ~/Project/docoGen-html-ui [17:46:34] Using gulpfile ~/Project/docoGen-html-ui/gulpfile.js [17:46:34] Using gulpfile ~/Project/docoGen-html-ui/gulpfile.js [17:46:34] Starting 'themes'... [17:46:34] Starting 'styles'... [17:46:34] Starting 'vendor'... [17:46:34] Starting 'setup'... [17:46:34] Starting 'browserify-vendor'... [17:46:34] Starting 'i18n'... [17:46:34] Finished 'setup' after 20 ms [17:46:34] Finished 'themes' after 66 ms [17:46:34] Starting 'initial'... [17:46:34] Finished 'initial' after 35 μs Gulp - Initialize completed [17:46:35] Finished 'i18n' after 1.46 s [17:46:35] Finished 'styles' after 1.53 s [17:46:35] Finished 'vendor' after 1.64 s [17:46:37] Finished 'browserify-vendor' after 3.24 s [17:46:37] Starting 'browserify'... [17:46:45] Finished 'browserify' after 8.29 s [17:46:45] Starting 'build'... [17:46:45] Finished 'build' after 3.8 μs Gulp - Build completed