{"id":20476753,"url":"https://github.com/tresjs/repl","last_synced_at":"2026-02-19T09:01:54.453Z","repository":{"id":206218324,"uuid":"715599073","full_name":"Tresjs/repl","owner":"Tresjs","description":"A Vue component to create a TresJS sandbox. Based on sfc.vuejs.org.","archived":false,"fork":false,"pushed_at":"2024-10-23T23:39:36.000Z","size":492,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-24T13:13:37.862Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://sandbox-tresjs.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tresjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-07T13:20:49.000Z","updated_at":"2024-07-26T07:50:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"66a2cba1-72fd-4244-a60b-8264a20aa23e","html_url":"https://github.com/Tresjs/repl","commit_stats":null,"previous_names":["tresjs/sandbox","tresjs/repl"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tresjs%2Frepl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tresjs%2Frepl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tresjs%2Frepl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tresjs%2Frepl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tresjs","download_url":"https://codeload.github.com/Tresjs/repl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248717241,"owners_count":21150387,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T15:22:54.966Z","updated_at":"2026-02-19T09:01:49.419Z","avatar_url":"https://github.com/Tresjs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @tresjs/repl\n\nTresJS repl as a Vue 3 component.\n\n### With Monaco Editor\n\nWith Volar support, autocomplete, type inference, and semantic highlighting. Heavier bundle, loads dts files from CDN, better for standalone use cases.\n\n```vue\n\u003cscript setup\u003e\nimport { Repl } from '@tresjs/repl'\nimport Monaco from '@tresjs/repl/monaco-editor'\nimport '@tresjs/repl/style.css'\n\u003c/script\u003e\n\n\u003ctemplate\u003e\n  \u003cRepl :editor=\"Monaco\" /\u003e\n\u003c/template\u003e\n```\n\n## Advanced Usage\n\nCustomize the behavior of the REPL by manually initializing the store.\n\n```vue\n\u003cscript setup\u003e\nimport { watchEffect } from 'vue'\nimport { Repl, ReplStore } from '@tresjs/repl'\nimport Monaco from '@tresjs/repl/monaco-editor'\n\n// retrieve some configuration options from the URL\nconst query = new URLSearchParams(location.search)\n\nconst store = new ReplStore({\n  // initialize repl with previously serialized state\n  serializedState: location.hash.slice(1),\n\n  // starts on the output pane (mobile only) if the URL has a showOutput query\n  showOutput: query.has('showOutput'),\n  // starts on a different tab on the output pane if the URL has a outputMode query\n  // and default to the \"preview\" tab\n  outputMode: query.get('outputMode') || 'preview',\n\n  // specify the default URL to import Vue runtime from in the repl\n  // default is the CDN link from jsdelivr.com with version matching Vue's version\n  // from peerDependency\n  defaultVueRuntimeURL: 'cdn link to vue.runtime.esm-browser.js',\n})\n\n// persist state to URL hash\nwatchEffect(() =\u003e history.replaceState({}, '', store.serialize()))\n\n// pre-set import map\nstore.setImportMap({\n  imports: {\n    myLib: 'cdn link to esm build of myLib',\n  },\n})\n\n// use a specific version of Vue\nstore.setVueVersion('3.2.8')\n\u003c/script\u003e\n\n\u003ctemplate\u003e\n  \u003cRepl :store=\"store\" :editor=\"Monaco\" :showCompileOutput=\"true\" /\u003e\n\u003c/template\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftresjs%2Frepl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftresjs%2Frepl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftresjs%2Frepl/lists"}