-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b46d062
commit c708b0d
Showing
13 changed files
with
89 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,7 @@ Thumbs.db | |
# *.tar.gz | ||
|
||
_site | ||
demo/ | ||
./test.js | ||
|
||
/coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
# Shines | ||
新一代文档网站生成工具,基于node, React,markdown,目前还未开发完成。 | ||
新一代文档网站生成工具,基于node, recet,markdown。 | ||
|
||
# Usage | ||
|
||
``` | ||
npm install | ||
bin/ydoc build | ||
npm install ydoc | ||
ydoc init | ||
ydoc build | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
# YDoc | ||
 | ||
|
||
<<<<<<< HEAD | ||
* [Documents](/documents/index.html) | ||
* [Jsxbook](/jsxbook/index.html) | ||
* [second](/jsxbook/index.html) | ||
======= | ||
|
||
* [documents](/documents/index.html) | ||
* [jsxbook](/jsxbook/index.html) | ||
* [second](/jsxbook/index.html) | ||
* [API](/api/index.html) | ||
>>>>>>> 4f0e3bfdca1d08973b72213a4fbf7b9e840c1b01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<h1>About</h1> | ||
<p> | ||
... | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# env | ||
env | ||
|
||
## title | ||
content | ||
|
||
### sub-title | ||
content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# ydoc | ||
This is home page of documents book. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Introduction | ||
Introduction | ||
|
||
## title | ||
content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Summary | ||
|
||
* [Installation](installation.md) | ||
|
||
### Getting Started | ||
|
||
* [Introduction](intro.md#) | ||
* [env](env.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
welcome: Welcome to use ydoc. | ||
--- | ||
|
||
<h1>{welcome}</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# YDoc | ||
 | ||
|
||
|
||
* [documents](/documents/index.html) | ||
|
||
* [about](/about/index.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,21 @@ | ||
const path = require('path'); | ||
const fs = require('fs-extra'); | ||
const projectPath = process.cwd(); | ||
const utils = require('../utils'); | ||
const initPath = path.resolve(__dirname, '../../init'); | ||
const docsPath = path.resolve(projectPath, 'docs') | ||
|
||
module.exports = { | ||
setOptions: function (yargs) {}, | ||
run: function (argv) { | ||
console.log(argv) | ||
setOptions: function () {}, | ||
run: function () { | ||
let configFilepath = utils.getConfigPath(projectPath); | ||
if(configFilepath){ | ||
return utils.log.error('The current directory already exists ydoc config.') | ||
}else if(utils.dirExist(docsPath)){ | ||
return utils.log.error('The current directory already exists docs directory.'); | ||
} | ||
fs.ensureDirSync(docsPath); | ||
fs.copySync(initPath, docsPath) | ||
}, | ||
desc: 'Initialize a document site' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters