Skip to content
This repository has been archived by the owner on May 24, 2021. It is now read-only.

Commit

Permalink
fix(documentation): Refactor docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-heimbuch committed Aug 21, 2018
1 parent cfa9784 commit 423d811
Show file tree
Hide file tree
Showing 13 changed files with 142 additions and 55 deletions.
10 changes: 0 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,16 +200,6 @@ jobs:
- run: yarn global add greenkeeper-lockfile@1
- run: greenkeeper-lockfile-upload

deploy-preview:
<<: *defaults-js
name: Deploying Surge.sh Preview
steps:
- attach_workspace:
at: ~/podlove-web-player
- restore-cache: *yarn-restore-cache
- run: yarn global add surge-preview
- run: surge-preview

deploy-staging:
<<: *defaults-js
name: Deploying to podlove-player.surge.sh
Expand Down
21 changes: 11 additions & 10 deletions docs/.vuepress/components/ColorPicker.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
<template>
<div class="container">
<podlove-web-player :config="config" @ready="onReady"/>

<div class="row">
<div class="column">
<h4>Main</h4>
<picker v-model="main" />
</div>
<div class="column">
<h4>Highlight</h4>
<picker v-model="highlight" />
<ClientOnly>
<div class="row">
<div class="column">
<h4>Main</h4>
<picker v-model="main" />
</div>
<div class="column">
<h4>Highlight</h4>
<picker v-model="highlight" />
</div>
</div>
</div>
</ClientOnly>
</div>
</template>

Expand Down
28 changes: 16 additions & 12 deletions docs/.vuepress/components/JsonEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
</template>

<script>
import Editor from 'jsoneditor/dist/jsoneditor.min'
export default {
name: 'json-editor',
props: ['json', 'height', 'mode'],
Expand All @@ -16,19 +14,21 @@
}
},
mounted () {
this.editor = new Editor(this.$el, {
search: false,
onChangeText: this.onChange.bind(this),
sortObjectKeys: false,
mode: this.mode || 'code',
statusBar: false
})
import('jsoneditor/dist/jsoneditor.min').then(Editor => {
this.editor = new Editor.default(this.$el, {
search: false,
onChangeText: this.onChange.bind(this),
sortObjectKeys: false,
mode: this.mode || 'code',
statusBar: false
})
this.$emit('ready', this.editor)
this.editor.set(this.json)
this.$emit('ready', this.editor)
this.editor.set(this.json)
})
},
beforeDestroy() {
this.editor.destroy()
this.editor && this.editor.destroy()
this.editor = null
}
}
Expand All @@ -46,4 +46,8 @@
.jsoneditor-menu {
display: none;
}
.ace_editor {
position: static;
}
</style>
2 changes: 2 additions & 0 deletions docs/.vuepress/components/Playground.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<template>
<div>
<podlove-web-player :config="example" @ready="initPlayer" />

<h4>Config</h4>
<json-editor :json="example" @update="updateConfig" height="500px" />
</div>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@
}]
export default {
name: 'store-dispatch',
data () {
return {
store: null,
Expand Down
2 changes: 2 additions & 0 deletions docs/.vuepress/components/StoreSubscribe.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import example from '../public/fixtures/example.json'
export default {
name: 'store-subscribe',
data () {
return {
example,
Expand Down
12 changes: 2 additions & 10 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const base = process.env.BASE || ''

module.exports = {
title: 'VuePress Millidocs',
base,
description: 'Simple documentation theme featuring Milligram CSS framework',
theme: 'millidocs',
head: [
Expand All @@ -14,14 +15,5 @@ module.exports = {
permalink: false,
permalinkBefore: false
}
},
// configureWebpack: {
// resolve: {
// alias: {
// '@assets': resolve('blog', 'assets'),
// '@theme': resolve('blog', '.vuepress', 'theme'),
// '@styles': resolve('blog', '.vuepress', 'theme', 'styles')
// }
// }
// },
}
}
14 changes: 14 additions & 0 deletions docs/.vuepress/public/fixtures/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,20 @@
"image": ""
}
],
"visibleComponents": [
"tabInfo",
"tabChapters",
"tabDownload",
"tabAudio",
"tabShare",
"poster",
"showTitle",
"episodeTitle",
"subtitle",
"progressbar",
"controlSteppers",
"controlChapters"
],
"contributors": [
{
"name": "Tim Pritlove",
Expand Down
2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ To integrate the player you first have to install tha package:
npm install @podlove/podlove-web-player --save
```

Afterwards move the player assets to a public folder of some webserver. By default the player will try to load further chunks from the webserver base. If the player files are located in a subpath you have to adapt the `reference.base` accordingly (see [config]({{ 'config.html' | relative_url }}))
Afterwards move the player assets to a public folder of some webserver. By default the player will try to load further chunks from the webserver base. If the player files are located in a subpath you have to adapt the `reference.base` accordingly (see [config]({{ $withBase('config.html') }})
2 changes: 1 addition & 1 deletion docs/player-dispatches.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ You can find a complete list of available types in the [types definition](https:

## Dispatching to the Player

<store-dispatches />
<store-dispatch />
3 changes: 3 additions & 0 deletions now.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"alias": "podlove-web-player"
}
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@
],
"scripts": {
"dist:clean": "mkdir -p dist && rm -rf dist/*",
"docs:install": "cd docs && bundle install",
"docs:dev": "vuepress dev docs",
"docs:prod": "npm run docs:install && jekyll build --source docs --destination dist --config docs/_config_prd.yml && cp -R docs/fixtures/* dist/fixtures",
"docs:prod": "vuepress build docs --dest dist/ && npm run webpack:build",
"webpack:dev": "webpack-dev-server --progress --config build/webpack.config.dev.js",
"webpack:build": "webpack --config build/webpack.config.prod.js",
"webpack:cdn": "webpack --config build/webpack.config.cdn.js",
"build": "npm run webpack:build",
"now-build": "npm run docs:prod && npm run build",
"now-start": "serve dist/",
"build:cdn": "npm run webpack:cdn",
"dev": "node scripts/dev.js",
"test": "npm run test:prepare && NODE_ENV=AVA nyc ava && nyc report --reporter=html",
Expand Down Expand Up @@ -73,6 +74,7 @@
"redux": "3.7.2",
"redux-actions": "2.6.1",
"redux-vuex": "^0.1.1",
"serve": "^10.0.0",
"superagent": "3.8.3",
"v-tooltip": "2.0.0-rc.33",
"vue": "2.5.17",
Expand Down
Loading

0 comments on commit 423d811

Please sign in to comment.