@learnpack/learnpack 2.0.24 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -54,6 +54,7 @@ export interface IConfig {
54
54
  exercisesPath: string;
55
55
  disableGrading: boolean; // TODO: Deprecate
56
56
  actions: Array<string>; // TODO: Deprecate
57
+ autoPlay: boolean;
57
58
  // TODO: nameExerciseValidation
58
59
  disabledActions?: Array<TConfigAction>;
59
60
  compiler: TCompiler;
@@ -144,7 +144,7 @@ const onPull = (callback: (T?: any) => any) => {
144
144
  try {
145
145
  loadFile(options.path || "");
146
146
  } catch {
147
- logger.debug("No previeues queue file, waiting for it to be created...");
147
+ logger.debug("No previoues queue file, waiting for it to be created...");
148
148
  }
149
149
 
150
150
  if (!watcher) {
@@ -1,24 +1,24 @@
1
- # `01` Hello World
2
-
3
- Puedes tener un archivo README el cual será como una página de un libro, sin archivos de código.
4
-
5
- También puedes agregar un archivo `README.[lenguaje].md` para traducciones, por ejemplo `README.es.md` para español.
6
-
7
- ## Inserta videos
8
-
9
- Si quieres incluir algún video introductorio para cada ejercicio, agrega la propiedad `intro` en el inicio del README.md para ese ejercicio en particular:
10
-
11
- ```markdown
12
- ---
13
- intro: "https://www.youtube.com/watch?v=YkgkThdzX-8"
14
- ---
15
- ```
16
-
17
- Tambien puedes agregar un video explicando la solución para cada ejercicio agregando la propiedad `tutorial` al inicio del markdown del README.md correspondiente:
18
-
19
- ```markdown
20
- ---
21
- intro: "https://www.youtube.com/watch?v=YkgkThdzX-8"
22
- tutorial: "https://www.youtube.com/watch?v=YkgkThdzX-8"
23
- ---
24
- ```
1
+ # `01` Hello World
2
+
3
+ Puedes tener un archivo README el cual será como una página de un libro, sin archivos de código.
4
+
5
+ También puedes agregar un archivo `README.[lenguaje].md` para traducciones, por ejemplo `README.es.md` para español.
6
+
7
+ ## Inserta videos
8
+
9
+ Si quieres incluir algún video introductorio para cada ejercicio, agrega la propiedad `intro` en el inicio del README.md para ese ejercicio en particular:
10
+
11
+ ```markdown
12
+ ---
13
+ intro: "https://www.youtube.com/watch?v=YkgkThdzX-8"
14
+ ---
15
+ ```
16
+
17
+ Tambien puedes agregar un video explicando la solución para cada ejercicio agregando la propiedad `tutorial` al inicio del markdown del README.md correspondiente:
18
+
19
+ ```markdown
20
+ ---
21
+ intro: "https://www.youtube.com/watch?v=YkgkThdzX-8"
22
+ tutorial: "https://www.youtube.com/watch?v=YkgkThdzX-8"
23
+ ---
24
+ ```
@@ -1,24 +1,24 @@
1
- # `01` Hello World
2
-
3
- You can have just a README file and it will be like a page in a book, no code files.
4
-
5
- You can also add a `README.[lang].md` file for translations, for example: `README.es.md` for spanish.
6
-
7
- ## Video compatibility
8
-
9
- If you want to include some video introduction for each exercise, add a `intro` property in the markdown frontmatter of the README.md for that particular exercise:
10
-
11
- ```markdown
12
- ---
13
- intro: "https://www.youtube.com/watch?v=YkgkThdzX-8"
14
- ---
15
- ```
16
-
17
- You can also add a video solution for each exercise by adding a `tutorial` property on the markdown frontmatter of it's README.md:
18
-
19
- ```markdown
20
- ---
21
- intro: "https://www.youtube.com/watch?v=YkgkThdzX-8"
22
- tutorial: "https://www.youtube.com/watch?v=YkgkThdzX-8"
23
- ---
24
- ```
1
+ # `01` Hello World
2
+
3
+ You can have just a README file and it will be like a page in a book, no code files.
4
+
5
+ You can also add a `README.[lang].md` file for translations, for example: `README.es.md` for spanish.
6
+
7
+ ## Video compatibility
8
+
9
+ If you want to include some video introduction for each exercise, add a `intro` property in the markdown frontmatter of the README.md for that particular exercise:
10
+
11
+ ```markdown
12
+ ---
13
+ intro: "https://www.youtube.com/watch?v=YkgkThdzX-8"
14
+ ---
15
+ ```
16
+
17
+ You can also add a video solution for each exercise by adding a `tutorial` property on the markdown frontmatter of it's README.md:
18
+
19
+ ```markdown
20
+ ---
21
+ intro: "https://www.youtube.com/watch?v=YkgkThdzX-8"
22
+ tutorial: "https://www.youtube.com/watch?v=YkgkThdzX-8"
23
+ ---
24
+ ```
@@ -1,20 +1,18 @@
1
1
  import * as chokidar from "chokidar";
2
+ import Console from "./console";
2
3
  import * as debounce from "debounce";
3
4
 
4
- export default (path: string) =>
5
+ export default (path: string, reloadSocket: () => void) =>
5
6
  new Promise((resolve /* , reject */) => {
7
+ Console.debug("PATH:", path);
6
8
  const watcher = chokidar.watch(path, {
7
9
  // TODO: This watcher is not ready yet
8
- // ignored: (_path: string, _stats: any) => {
9
- // return new RegExp(_path)
10
- // },
11
- persistent: true,
12
- depth: 1,
10
+ ignored: /^(?=.*(\.\w+)$)(?!.*\.md$).*$/gm,
13
11
  ignoreInitial: true,
14
12
  });
15
-
16
13
  const onChange = (eventname: string, _filename: string) => {
17
14
  resolve(eventname /* , filename */);
15
+ reloadSocket();
18
16
  };
19
17
 
20
18
  watcher.on("all", debounce(onChange, 500, true));