mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-20 15:26:06 +08:00
Update docs config
- Don't ignore built class docs - pin requirement versions for docs - update docs build instructions - update repo URL
This commit is contained in:
parent
bf0aa51148
commit
8bd013e9e9
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -13,9 +13,7 @@ npm-debug.log
|
||||||
debug.log
|
debug.log
|
||||||
/tags
|
/tags
|
||||||
/electron/
|
/electron/
|
||||||
|
/_docs_output
|
||||||
|
|
||||||
/docs_src/classes/
|
|
||||||
|
|
||||||
spec/fixtures/evil-files/
|
spec/fixtures/evil-files/
|
||||||
build/resources/certs
|
build/resources/certs
|
||||||
|
|
29
README.md
29
README.md
|
@ -111,6 +111,35 @@ Note these are not tested or officially supported by Nylas, but we still think t
|
||||||
When you install packages, they're moved to ~/.nylas-mail/packages, and N1 runs apm install on the command line to fetch dependencies listed in the package's package.json
|
When you install packages, they're moved to ~/.nylas-mail/packages, and N1 runs apm install on the command line to fetch dependencies listed in the package's package.json
|
||||||
|
|
||||||
|
|
||||||
|
## Building the docs
|
||||||
|
|
||||||
|
Plugin SDK docs are available at [https://nylas.github.io/nylas-mail/](https://nylas.github.io/nylas-mail/). Here's how you build them:
|
||||||
|
|
||||||
|
Until my patch gets merged, docs need to be built manually using mg's fork.
|
||||||
|
|
||||||
|
git clone git@github.com:grinich/gitbook.git
|
||||||
|
|
||||||
|
cd nylas-mail
|
||||||
|
|
||||||
|
./node_modules/.bin/gitbook alias ../gitbook latest
|
||||||
|
|
||||||
|
Then to actually build the docs:
|
||||||
|
|
||||||
|
script/grunt docs
|
||||||
|
|
||||||
|
./node_modules/.bin/gitbook --gitbook=latest build . ./_docs_output --log=debug --debug
|
||||||
|
|
||||||
|
rm -r docs_src/classes
|
||||||
|
|
||||||
|
If you want to preview the docs:
|
||||||
|
|
||||||
|
pushd ./_docs_output; python -m SimpleHTTPServer; popd
|
||||||
|
|
||||||
|
Just want to publish everything? There's a helper script that does it for you:
|
||||||
|
|
||||||
|
script/publish-docs
|
||||||
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
You can configure Nylas Mail in a few ways—for instance, pointing it to your self-hosted instance of the sync engine or changing the interface zoom level. [Learn more about how.](https://github.com/nylas/nylas-mail/blob/master/CONFIGURATION.md)
|
You can configure Nylas Mail in a few ways—for instance, pointing it to your self-hosted instance of the sync engine or changing the interface zoom level. [Learn more about how.](https://github.com/nylas/nylas-mail/blob/master/CONFIGURATION.md)
|
||||||
|
|
||||||
|
|
|
@ -16,12 +16,12 @@
|
||||||
|
|
||||||
"pluginsConfig": {
|
"pluginsConfig": {
|
||||||
"editlink": {
|
"editlink": {
|
||||||
"base": "https://github.com/nylas/nylas-mail-docs/tree/master",
|
"base": "https://github.com/nylas/nylas-mail/tree/master/docs_src",
|
||||||
"label": "Edit This Page",
|
"label": "Edit This Page",
|
||||||
"multilingual": false
|
"multilingual": false
|
||||||
},
|
},
|
||||||
"github": {
|
"github": {
|
||||||
"url": "https://github.com/nylas/nylas-mail-docs"
|
"url": "https://github.com/nylas/nylas-mail"
|
||||||
},
|
},
|
||||||
"favicon": {
|
"favicon": {
|
||||||
"shortcut": "/img/favicon.png"
|
"shortcut": "/img/favicon.png"
|
||||||
|
|
|
@ -45,30 +45,11 @@ Nylas Mail is built on top of Electron, which runs the latest version of Chromiu
|
||||||
Need help? Check out the [FAQ](https://support.nylas.com/hc/en-us) or post a question in the [slack channel](http://slack-invite.nylas.com/).
|
Need help? Check out the [FAQ](https://support.nylas.com/hc/en-us) or post a question in the [slack channel](http://slack-invite.nylas.com/).
|
||||||
|
|
||||||
|
|
||||||
#### Building these docs
|
#### TODOs
|
||||||
|
|
||||||
Until my patch gets merged, docs need to be built manually using my fork.
|
- Add plugin examples with code (es6 not coffeescript)
|
||||||
|
- Smart Linkify references. Maybe use something like [gitbook-plugin-regexplace](https://github.com/markomanninen/gitbook-plugin-regexplace)
|
||||||
git clone git@github.com:grinich/gitbook.git
|
- Have class reference files link to their actual sourcefiles
|
||||||
|
- Consider adding infinite scroll
|
||||||
cd nylas-mail
|
|
||||||
|
|
||||||
./node_modules/.bin/gitbook alias ../gitbook latest
|
|
||||||
|
|
||||||
Then to actually build the docs:
|
|
||||||
|
|
||||||
script/grunt docs
|
|
||||||
|
|
||||||
./node_modules/.bin/gitbook --gitbook=latest build . ./docs
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- TODO
|
|
||||||
|
|
||||||
Smart Linkify references:
|
|
||||||
- https://github.com/markomanninen/gitbook-plugin-regexplace
|
|
||||||
- Figure out why infinitescroll isn't working
|
|
||||||
- Add examples
|
|
||||||
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
|
@ -115,18 +115,15 @@
|
||||||
"flow-bin": "0.33.0",
|
"flow-bin": "0.33.0",
|
||||||
"gitbook": "^3.2.2",
|
"gitbook": "^3.2.2",
|
||||||
"gitbook-cli": "^2.3.0",
|
"gitbook-cli": "^2.3.0",
|
||||||
"gitbook-core": "^4.0.0-alpha.1",
|
|
||||||
"gitbook-plugin-anchors": "^0.7.1",
|
"gitbook-plugin-anchors": "^0.7.1",
|
||||||
"gitbook-plugin-editlink": "^1.0.2",
|
"gitbook-plugin-editlink": "^1.0.2",
|
||||||
"gitbook-plugin-favicon": "0.0.2",
|
"gitbook-plugin-favicon": "0.0.2",
|
||||||
"gitbook-plugin-github": "^2.0.0",
|
"gitbook-plugin-github": "^2.0.0",
|
||||||
"gitbook-plugin-infinitescroll": "^0.1.0",
|
|
||||||
"gitbook-plugin-theme-api": "^1.1.2",
|
"gitbook-plugin-theme-api": "^1.1.2",
|
||||||
"gitbook-plugin-theme-faq": "^1.2.1",
|
"handlebars": "4.0.6",
|
||||||
"grunt-gitbook": "^1.5.0",
|
|
||||||
"joanna": "0.0.8",
|
"joanna": "0.0.8",
|
||||||
"meta-marked": "^0.4.2",
|
"meta-marked": "0.4.2",
|
||||||
"tello": "^1.0.6"
|
"tello": "1.0.6"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"node-mac-notifier": "0.0.13"
|
"node-mac-notifier": "0.0.13"
|
||||||
|
|
19
script/publish-docs
Executable file
19
script/publish-docs
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Builds docs and moves the output to gh-pages branch (overwrites)
|
||||||
|
mkdir -p _docs_output
|
||||||
|
script/grunt docs
|
||||||
|
./node_modules/.bin/gitbook --gitbook=latest build . ./_docs_output --log=debug --debug
|
||||||
|
rm -r docs_src/classes
|
||||||
|
git checkout gh-pages --quiet
|
||||||
|
cp -rf _docs_output/* .
|
||||||
|
# rm -r _docs_output
|
||||||
|
|
||||||
|
git add .
|
||||||
|
git status -s
|
||||||
|
printf "\nDocs updated! \n\n"
|
||||||
|
git commit -m 'Update Docs'
|
||||||
|
git push origin gh-pages
|
||||||
|
git checkout master
|
Loading…
Reference in a new issue