-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path05206f32.9d8ed7b3.js
1 lines (1 loc) · 5.82 KB
/
05206f32.9d8ed7b3.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{135:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return i})),n.d(t,"metadata",(function(){return l})),n.d(t,"rightToc",(function(){return c})),n.d(t,"default",(function(){return p}));var r=n(2),a=n(9),o=(n(0),n(163)),i={id:"env-vars",title:"Environment Variables",sidebar_label:"Env Variables"},l={id:"env-vars",title:"Environment Variables",description:"## Variables",source:"@site/docs/env-vars.md",permalink:"/docs/env-vars",editUrl:"https://github.com/coderoad/coderoad-vscode/edit/master/docs/docs/env-vars.md",sidebar_label:"Env Variables",sidebar:"someSidebar",previous:{title:"Development",permalink:"/docs/development"},next:{title:"Inspiration",permalink:"/docs/inspiration"}},c=[{value:"Variables",id:"variables",children:[]},{value:"How to Use Variables",id:"how-to-use-variables",children:[{value:"Local",id:"local",children:[]},{value:"Web / Virtual Machine",id:"web--virtual-machine",children:[]}]}],b={rightToc:c};function p(e){var t=e.components,n=Object(a.a)(e,["components"]);return Object(o.b)("wrapper",Object(r.a)({},b,n,{components:t,mdxType:"MDXLayout"}),Object(o.b)("h2",{id:"variables"},"Variables"),Object(o.b)("p",null,"CodeRoad has a number of configurations:"),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},Object(o.b)("p",{parentName:"li"},Object(o.b)("inlineCode",{parentName:"p"},"CODEROAD_DISPLAY_RUN_TEST_BUTTON"),' - show the "Run" button on the tutorial page. Defaults ',Object(o.b)("inlineCode",{parentName:"p"},"true"),".")),Object(o.b)("li",{parentName:"ul"},Object(o.b)("p",{parentName:"li"},Object(o.b)("inlineCode",{parentName:"p"},"CODEROAD_DISABLE_RUN_ON_SAVE")," - stop running tests whenever a file is saved. Defaults ",Object(o.b)("inlineCode",{parentName:"p"},"false"),".")),Object(o.b)("li",{parentName:"ul"},Object(o.b)("p",{parentName:"li"},Object(o.b)("inlineCode",{parentName:"p"},"CODEROAD_TUTORIAL_URL")," - pass in a url path to a ",Object(o.b)("inlineCode",{parentName:"p"},"tutorial.json")," file. The tutorial will launch on startup. This is a way to create one-click tutorial experiences for web or locally. Defaults ",Object(o.b)("inlineCode",{parentName:"p"},"null"),".")),Object(o.b)("li",{parentName:"ul"},Object(o.b)("p",{parentName:"li"},Object(o.b)("inlineCode",{parentName:"p"},"CODEROAD_ADMIN_MODE"),' - a mode for tutorial developers. Under the "Review" page, you can jump around between levels & steps to test development. Defaults ',Object(o.b)("inlineCode",{parentName:"p"},"false"),"."))),Object(o.b)("h2",{id:"how-to-use-variables"},"How to Use Variables"),Object(o.b)("h3",{id:"local"},"Local"),Object(o.b)("p",null,"Launch the code editor with the environmental variables."),Object(o.b)("pre",null,Object(o.b)("code",Object(r.a)({parentName:"pre"},{className:"language-shell"}),"CODEROAD_ADMIN_MODE=true code .\n")),Object(o.b)("p",null,"Note that this requires the ",Object(o.b)("a",Object(r.a)({parentName:"p"},{href:"https://code.visualstudio.com/docs/editor/command-line"}),"VSCode CLI"),"."),Object(o.b)("h3",{id:"web--virtual-machine"},"Web / Virtual Machine"),Object(o.b)("p",null,"VSCode can be run in a browser in a variety of ways:"),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},Object(o.b)("a",Object(r.a)({parentName:"li"},{href:"https://github.com/cdr/code-server"}),"Code Server")),Object(o.b)("li",{parentName:"ul"},Object(o.b)("a",Object(r.a)({parentName:"li"},{href:"https://visualstudio.microsoft.com/services/visual-studio-codespaces/"}),"Codespaces"))),Object(o.b)("p",null,"Read the docs for info on how to pass in variables, or contact ",Object(o.b)("inlineCode",{parentName:"p"},"coderoadapp@gmail.com")," for a working example."))}p.isMDXComponent=!0},163:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return O}));var r=n(0),a=n.n(r);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var b=a.a.createContext({}),p=function(e){var t=a.a.useContext(b),n=t;return e&&(n="function"==typeof e?e(t):l({},t,{},e)),n},s=function(e){var t=p(e.components);return a.a.createElement(b.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},d=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,b=c(e,["components","mdxType","originalType","parentName"]),s=p(n),d=r,O=s["".concat(i,".").concat(d)]||s[d]||u[d]||o;return n?a.a.createElement(O,l({ref:t},b,{components:n})):a.a.createElement(O,l({ref:t},b))}));function O(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=d;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:r,i[1]=l;for(var b=2;b<o;b++)i[b]=n[b];return a.a.createElement.apply(null,i)}return a.a.createElement.apply(null,n)}d.displayName="MDXCreateElement"}}]);