-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path5a173680.b055d620.js
1 lines (1 loc) · 7.77 KB
/
5a173680.b055d620.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{149:function(e,n,t){"use strict";t.r(n),t.d(n,"frontMatter",(function(){return i})),t.d(n,"metadata",(function(){return s})),t.d(n,"rightToc",(function(){return c})),t.d(n,"default",(function(){return p}));var r=t(2),o=t(9),a=(t(0),t(163)),i={id:"config-docs",title:"Config",sidebar_label:"Config"},s={id:"config-docs",title:"Config",description:"### Description",source:"@site/docs/config-docs.md",permalink:"/docs/config-docs",editUrl:"https://github.com/coderoad/coderoad-vscode/edit/master/docs/docs/config-docs.md",sidebar_label:"Config",sidebar:"someSidebar",previous:{title:"Create a Practice Tutorial",permalink:"/docs/create-a-practice-tutorial"},next:{title:"Hooks & Actions",permalink:"/docs/hooks-actions"}},c=[{value:"Description",id:"description",children:[]},{value:"Example",id:"example",children:[]},{value:"Options",id:"options",children:[]}],l={rightToc:c};function p(e){var n=e.components,t=Object(o.a)(e,["components"]);return Object(a.b)("wrapper",Object(r.a)({},l,t,{components:n,mdxType:"MDXLayout"}),Object(a.b)("h3",{id:"description"},"Description"),Object(a.b)("p",null,"The ",Object(a.b)("inlineCode",{parentName:"p"},"coderoad.yaml")," file also lives on the master branch. It describes commands to run when a lesson starts, files to start on and many other things."),Object(a.b)("h3",{id:"example"},"Example"),Object(a.b)("p",null,"An example of this for the markdown on the previous page might look like this:"),Object(a.b)("pre",null,Object(a.b)("code",Object(r.a)({parentName:"pre"},{className:"language-yaml"}),"version: '0.1.0'\nconfig:\n testRunner:\n command: ./node_modules/.bin/mocha\n args:\n filter: --grep\n tap: --reporter=mocha-tap-reporter\n repo:\n uri: https://github.com/username/repo\n branch: v0.1.0\n dependencies:\n - name: node\n version: '>=10'\nlevels:\n - id: '1'\n steps:\n - id: '1.1'\n setup:\n subtasks: false\n - id: '2'\n steps:\n - id: '2.1'\n setup:\n files:\n - index.html\n - id: '2.2'\n setup:\n subtasks: false\n")),Object(a.b)("p",null,"Note that the ID's for each lesson and step matches the ID's in the markdown."),Object(a.b)("h3",{id:"options"},"Options"),Object(a.b)("p",null,"Here's an example of many available options and what they do:"),Object(a.b)("pre",null,Object(a.b)("code",Object(r.a)({parentName:"pre"},{className:"language-yaml"}),"# A configuration file for a CodeRoad Tutorial\n# This is a YAML-formatted file.\n## Your personal version of the tutorial\n##\nversion: '0.1.0'\n## Data used to configure and setup the tutorial\n##\nconfig:\n ## Test runner setup.\n testRunner:\n ## The command called to run the test runner. For example \"npm run test\", or a path to the test runner binary. Required.\n command: ./node_modules/.bin/mocha\n ## Standard arguments used by a given test runner\n args:\n ## The command arg used to filter tests. Used by \"subtasks\"\n filter: --grep\n ## The command arg used to convert test runner output to TAP format. See https://testanything.org/ for more. Required.\n tap: --reporter=mocha-tap-reporter\n ## The directory where to run the test runner from. If not specified, tests will run from the root of the project. Optional.\n directory: coderoad\n ## Initial setup\n ##\n setup:\n ## A list of commands to run to configure the tutorial\n commands: []\n ## App versions helps to ensure compatability with the Extension\n appVersions:\n ## Ensure compatability with a minimal VSCode CodeRoad version\n vscode: '>=0.7.0'\n ## Repo information to load code from\n ##\n repo:\n ## The uri path to the repo containing the code commits. Required.\n ##\n uri: ''\n ## The branch on the repo uri that contains the code commits. Required.\n branch: ''\n\n ## A list of tutorial dependencies to ensure the environment is setup for the tutorial. Optional.\n ## The dependencies will be checked by running `dependency.name` --version and comparing it to the version provided.\n ##\n dependencies:\n []\n ## The name of the dependency\n # - name: node\n # ## The version requirement. See https://github.com/npm/node-semver for options.\n # version: '>=10'\n\n## A level is made up of\nlevels:\n - id: '1'\n steps:\n ## Example 1: Opening files\n - id: '1.1'\n ## Setup for the first task. Required.\n setup:\n ## Files to open in a text editor when the task loads. Optional.\n files:\n - package.json\n ## Solution for the first task. Required.\n solution:\n ## Files to open when the solution loads. Optional.\n files:\n - package.json\n ## Example Two: Running commands\n - id: '1.2'\n setup:\n ## CLI commands that are run when the task loads. Optional.\n commands:\n - npm install\n solution:\n commands:\n - npm install\n ## Example Three: Watchers\n - id: '1.3'\n setup:\n files:\n - package.json\n ## Listeners that run tests when a file or directory changes.\n watchers:\n - package.json\n - node_modules/some-package\n solution:\n files:\n - package.json\n ## Example Four: Subtasks\n - id: '1.4'\n setup:\n ## A filter is a regex that limits the test results\n filter: '^Example 2'\n ## A feature that shows subtasks: all filtered active test names and the status of the tests (pass/fail).\n subtasks: true\n")))}p.isMDXComponent=!0},163:function(e,n,t){"use strict";t.d(n,"a",(function(){return d})),t.d(n,"b",(function(){return f}));var r=t(0),o=t.n(r);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?i(Object(t),!0).forEach((function(n){a(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function c(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var l=o.a.createContext({}),p=function(e){var n=o.a.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):s({},n,{},e)),t},d=function(e){var n=p(e.components);return o.a.createElement(l.Provider,{value:n},e.children)},u={inlineCode:"code",wrapper:function(e){var n=e.children;return o.a.createElement(o.a.Fragment,{},n)}},m=Object(r.forwardRef)((function(e,n){var t=e.components,r=e.mdxType,a=e.originalType,i=e.parentName,l=c(e,["components","mdxType","originalType","parentName"]),d=p(t),m=r,f=d["".concat(i,".").concat(m)]||d[m]||u[m]||a;return t?o.a.createElement(f,s({ref:n},l,{components:t})):o.a.createElement(f,s({ref:n},l))}));function f(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var a=t.length,i=new Array(a);i[0]=m;var s={};for(var c in n)hasOwnProperty.call(n,c)&&(s[c]=n[c]);s.originalType=e,s.mdxType="string"==typeof e?e:r,i[1]=s;for(var l=2;l<a;l++)i[l]=t[l];return o.a.createElement.apply(null,i)}return o.a.createElement.apply(null,t)}m.displayName="MDXCreateElement"}}]);