Skip to content

Commit

Permalink
update gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
patarapolw committed Nov 24, 2019
1 parent 93fb8a8 commit e1a993f
Show file tree
Hide file tree
Showing 7 changed files with 143 additions and 21 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@ Positionals:
filename Path to the file to read
Options:
--version Show version number [boolean]
--edit, -e Edit the file in editor [boolean]
--media, -m Path to media folder [string]
--plugin, -p Path to plugin folder [string]
--no-media No media should be loaded [boolean]
--no-plugin No plugin should be loaded [boolean]
--help Show help [boolean]
--version Show version number [boolean]
--edit, -e Edit the file in editor [boolean]
--media, -m Path to media folder [string]
--no-media No media should be loaded [boolean]
--help Show help [boolean]
```

## Adding media to reveal-md
Expand All @@ -42,3 +40,7 @@ content (Pug or HTML or extended Markdown)
```

- The slides marked with `// global` or `// hidden` will be hidden.

## Examples

Please see <https://github.com/patarapolw/flatsrs>
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
},
"scripts": {
"start": "node ./bin/cli.js .",
"help": "node ./bin/cli.js --help",
"preinstall": "git submodule update --init --recursive && cd ./web && npm i && npm run build",
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand Down
118 changes: 118 additions & 0 deletions web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"gh:dev": "GITHUB=1 vue-cli-service serve",
"gh:deploy": "GITHUB=1 vue-cli-service build && gh-pages -d dist",
"dev": "vue-cli-service serve",
"build": "vue-cli-service build"
},
"dependencies": {
Expand Down Expand Up @@ -33,6 +35,7 @@
"devDependencies": {
"@vue/cli-plugin-typescript": "^4.0.0",
"@vue/cli-service": "^4.0.0",
"gh-pages": "^2.1.1",
"sass": "^1.19.0",
"sass-loader": "^8.0.0",
"typescript": "~3.5.3",
Expand Down
12 changes: 5 additions & 7 deletions web/readme-slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,11 @@ Positionals:
filename Path to the file to read
Options:
--version Show version number [boolean]
--edit, -e Edit the file in editor [boolean]
--media, -m Path to media folder [string]
--plugin, -p Path to plugin folder [string]
--no-media No media should be loaded [boolean]
--no-plugin No plugin should be loaded [boolean]
--help Show help [boolean]
--version Show version number [boolean]
--edit, -e Edit the file in editor [boolean]
--media, -m Path to media folder [string]
--no-media No media should be loaded [boolean]
--help Show help [boolean]
```

===
Expand Down
2 changes: 1 addition & 1 deletion web/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.navbar
span.mr-3 Press F to enter fullscreen
.ml-auto
b-button.mr-3(v-if="dirTree" variant="light" @click="isChooseFile = true") Choose file
b-button.mr-3(:disabled="!dirTree" variant="light" @click="isChooseFile = true") Choose file
b-button.mr-3(variant="light" @click="showPreview = !showPreview") {{showPreview ? "Hide Preview" : "Show Preview"}}
b-button.mr-3(variant="light" :disabled="!canSave" @click="saveMarkdown") Save
//- b-button.mr-3(variant="light" :disabled="!raw" @click="saveHTML") Download HTML
Expand Down
10 changes: 5 additions & 5 deletions web/vue.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const fs = require("fs");
const path = require("path");

// if (process.env.NODE_ENV !== "production") {
// const exampleFile = path.join(__dirname, "readme-slides.md");
// process.env.VUE_APP_PLACEHOLDER = fs.readFileSync(exampleFile, "utf-8");
// process.env.VUE_APP_TITLE = exampleFile;
// }
if (process.env.GITHUB) {
const exampleFile = path.join(__dirname, "readme-slides.md");
process.env.VUE_APP_PLACEHOLDER = fs.readFileSync(exampleFile, "utf-8");
process.env.VUE_APP_TITLE = exampleFile;
}

const baseUrl = "/";

Expand Down

0 comments on commit e1a993f

Please sign in to comment.