kirjs/ng2-codelab

Good and easy way to create new exercises.

Opened this issue · 1 comments

kirjs commented

Potential options:

  1. Simplify and document well existing format - this might work, but it would still require some skill and ramp-up time.
  2. Find an existing format which is used somewhere else - would be great, but I'm not sure where to even find it
  3. Build a UI tool for creating exercises - this would probable be the best experience, but this also requires a lot of work.

Example of how it works now:
To show hello between milestone 2 and 3 and to trim the whitespace, it should look like this
/*d:milestone-1:milestone-2/trimBoth*/ hello /*/d*/

import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {AppComponent} from './app.component';
/*d:thumbsComponentUse/trimLeading*/
import {ThumbsComponent} from './thumbs/thumbs.component';
/*/d*//*d:togglePanelComponentUse/trimLeading*/
import {TogglePanelComponent} from './toggle-panel/toggle-panel.component';
/*/d*//*d:diInjectService/trimLeading*/
import {VideoService} from './video/video.service';
/*/d*//*d:videoComponentUse/trimLeading*/
import {VideoComponent} from './video/video.component';
/*/d*//*d:contextComponentUse/trimLeading*/
import {ContextComponent} from './context/context.component';
/*/d*//*d:fuzzyPipeUse/trimLeading*/
import {FuzzyPipe} from './fuzzy-pipe/fuzzy.pipe';
/*/d*//*d:createModuleSolved/trimTrailing*/
@NgModule({
  imports: [BrowserModule],
  declarations: [AppComponent
    /*/d*//*d:videoComponentUseSolved/trimBoth*/, VideoComponent
    /*/d*//*d:thumbsComponentUseSolved/trimBoth*/, ThumbsComponent
    /*/d*//*d:togglePanelComponentUseSolved/trimBoth*/, TogglePanelComponent
    /*/d*//*d:contextComponentUse/trimBoth*/, ContextComponent
    /*/d*//*d:fuzzyPipeUseSolved/trimBoth*/, FuzzyPipe
    /*/d*//*d:createModuleSolved/trimBoth*/
  ],
  bootstrap: [AppComponent]/*/d*//*d:diInjectServiceSolved/trimTrailing*/,
  providers: [VideoService]
  /*/d*//*d:createModuleSolved/trimTrailing*/
})
export class AppModule {
  /*/d*//*d:createModuleSolved*/
}/*/d*/
kirjs commented

Simplify the language, create the playground