Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow starting on a specific view #15

Merged
merged 5 commits into from
Jan 20, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs: better comments about showOutput and outputMode
  • Loading branch information
posva committed Dec 17, 2021
commit 9504c0240b0269b55c1c441c5311b6ec51ba6852
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ const store = new ReplStore({
// initialize repl with previously serialized state
serializedState: location.hash.slice(1),

// start on the output pane in mobile devices, defaults to false
// starts on the output pane (mobile only) if the URL has a showOutput query
showOutput: query.has('showOutput'),
// start on the JS output tab, defaults to "preview"
// starts on a different tab on the output pane if the URL has a outputMode query
// and default to the "preview" tab
outputMode: (query.get('outputMode') || 'preview')

// specify the default URL to import Vue runtime from in the sandbox
Expand Down
3 changes: 1 addition & 2 deletions test/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { OutputModes } from 'src/output/types'
import { createApp, h, watchEffect } from 'vue'
import { Repl, ReplStore } from '../src'

Expand All @@ -10,7 +9,7 @@ const App = {
const store = new ReplStore({
serializedState: location.hash.slice(1),
showOutput: query.has('so'),
outputMode: (query.get('om') || 'preview') as OutputModes,
outputMode: query.get('om') || 'preview',
defaultVueRuntimeURL: import.meta.env.PROD
? undefined
: `${location.origin}/src/vue-dev-proxy`
Expand Down