@learnpack/learnpack 2.0.24 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +362 -27
- package/lib/commands/audit.d.ts +1 -1
- package/lib/commands/audit.js +48 -47
- package/lib/managers/config/defaults.d.ts +1 -0
- package/lib/managers/config/defaults.js +15 -14
- package/lib/managers/config/index.js +5 -10
- package/lib/models/config.d.ts +1 -0
- package/lib/utils/fileQueue.js +1 -1
- package/lib/utils/watcher.d.ts +1 -1
- package/lib/utils/watcher.js +5 -6
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
- package/src/commands/audit.ts +463 -462
- package/src/commands/init.ts +172 -172
- package/src/managers/config/defaults.ts +34 -33
- package/src/managers/config/index.ts +406 -412
- package/src/models/config.ts +1 -0
- package/src/utils/fileQueue.ts +1 -1
- package/src/utils/templates/incremental/.learn/exercises/01-hello-world/README.es.md +24 -24
- package/src/utils/templates/incremental/.learn/exercises/01-hello-world/README.md +24 -24
- package/src/utils/watcher.ts +5 -7
package/src/models/config.ts
CHANGED
@@ -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;
|
package/src/utils/fileQueue.ts
CHANGED
@@ -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
|
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
|
+
```
|
package/src/utils/watcher.ts
CHANGED
@@ -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
|
-
|
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));
|