@learnpack/learnpack 1.0.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +51 -398
- package/bin/run +14 -2
- package/oclif.manifest.json +1 -1
- package/package.json +135 -111
- package/src/commands/audit.ts +462 -0
- package/src/commands/clean.ts +29 -0
- package/src/commands/download.ts +62 -0
- package/src/commands/init.ts +169 -0
- package/src/commands/login.ts +42 -0
- package/src/commands/logout.ts +43 -0
- package/src/commands/publish.ts +107 -0
- package/src/commands/start.ts +229 -0
- package/src/commands/{test.js → test.ts} +19 -21
- package/src/index.ts +1 -0
- package/src/managers/config/allowed_files.ts +29 -0
- package/src/managers/config/defaults.ts +33 -0
- package/src/managers/config/exercise.ts +295 -0
- package/src/managers/config/index.ts +411 -0
- package/src/managers/file.ts +169 -0
- package/src/managers/gitpod.ts +84 -0
- package/src/managers/server/{index.js → index.ts} +26 -19
- package/src/managers/server/routes.ts +250 -0
- package/src/managers/session.ts +118 -0
- package/src/managers/socket.ts +239 -0
- package/src/managers/test.ts +83 -0
- package/src/models/action.ts +3 -0
- package/src/models/audit-errors.ts +4 -0
- package/src/models/config-manager.ts +23 -0
- package/src/models/config.ts +74 -0
- package/src/models/counter.ts +11 -0
- package/src/models/errors.ts +22 -0
- package/src/models/exercise-obj.ts +26 -0
- package/src/models/file.ts +5 -0
- package/src/models/findings.ts +18 -0
- package/src/models/flags.ts +10 -0
- package/src/models/front-matter.ts +11 -0
- package/src/models/gitpod-data.ts +19 -0
- package/src/models/language.ts +4 -0
- package/src/models/package.ts +7 -0
- package/src/models/plugin-config.ts +17 -0
- package/src/models/session.ts +26 -0
- package/src/models/socket.ts +48 -0
- package/src/models/status.ts +15 -0
- package/src/models/success-types.ts +1 -0
- package/src/plugin/command/compile.ts +17 -0
- package/src/plugin/command/test.ts +30 -0
- package/src/plugin/index.ts +6 -0
- package/src/plugin/plugin.ts +94 -0
- package/src/plugin/utils.ts +87 -0
- package/src/types/node-fetch.d.ts +1 -0
- package/src/ui/download.ts +71 -0
- package/src/utils/BaseCommand.ts +48 -0
- package/src/utils/SessionCommand.ts +48 -0
- package/src/utils/api.ts +194 -0
- package/src/utils/audit.ts +162 -0
- package/src/utils/console.ts +24 -0
- package/src/utils/errors.ts +117 -0
- package/src/utils/{exercisesQueue.js → exercisesQueue.ts} +12 -6
- package/src/utils/fileQueue.ts +198 -0
- package/src/utils/misc.ts +23 -0
- package/src/utils/templates/incremental/.learn/exercises/01-hello-world/README.es.md +2 -4
- package/src/utils/templates/incremental/.learn/exercises/01-hello-world/README.md +1 -2
- package/src/utils/templates/isolated/01-hello-world/README.es.md +1 -2
- package/src/utils/templates/isolated/01-hello-world/README.md +1 -2
- package/src/utils/templates/isolated/README.ejs +1 -1
- package/src/utils/templates/isolated/README.es.ejs +1 -1
- package/src/utils/validators.ts +18 -0
- package/src/utils/watcher.ts +27 -0
- package/plugin/command/compile.js +0 -17
- package/plugin/command/test.js +0 -29
- package/plugin/index.js +0 -6
- package/plugin/plugin.js +0 -71
- package/plugin/utils.js +0 -78
- package/src/commands/audit.js +0 -243
- package/src/commands/clean.js +0 -27
- package/src/commands/download.js +0 -52
- package/src/commands/hello.js +0 -20
- package/src/commands/init.js +0 -133
- package/src/commands/login.js +0 -45
- package/src/commands/logout.js +0 -39
- package/src/commands/publish.js +0 -78
- package/src/commands/start.js +0 -169
- package/src/index.js +0 -1
- package/src/managers/config/allowed_files.js +0 -12
- package/src/managers/config/defaults.js +0 -32
- package/src/managers/config/exercise.js +0 -212
- package/src/managers/config/index.js +0 -342
- package/src/managers/file.js +0 -137
- package/src/managers/server/routes.js +0 -151
- package/src/managers/session.js +0 -83
- package/src/managers/socket.js +0 -185
- package/src/managers/test.js +0 -77
- package/src/ui/download.js +0 -48
- package/src/utils/BaseCommand.js +0 -34
- package/src/utils/SessionCommand.js +0 -46
- package/src/utils/api.js +0 -164
- package/src/utils/audit.js +0 -114
- package/src/utils/console.js +0 -16
- package/src/utils/errors.js +0 -90
- package/src/utils/fileQueue.js +0 -194
- package/src/utils/misc.js +0 -26
- package/src/utils/validators.js +0 -15
- package/src/utils/watcher.js +0 -24
package/README.md
CHANGED
@@ -1,52 +1,40 @@
|
|
1
|
-
learnpack
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
[![
|
7
|
-
[![
|
8
|
-
[![
|
9
|
-
|
10
|
-
|
1
|
+
# learnpack
|
2
|
+
|
3
|
+
Create, sell or download and take learning amazing learning packages
|
4
|
+
|
5
|
+
[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
|
6
|
+
[![Version](https://img.shields.io/npm/v/learnpack.svg)](https://npmjs.org/package/learnpack)
|
7
|
+
[![Downloads/week](https://img.shields.io/npm/dw/learnpack.svg)](https://npmjs.org/package/learnpack)
|
8
|
+
[![License](https://img.shields.io/npm/l/learnpack.svg)](https://github.com/learnpack/learnpack-cli/blob/master/package.json)
|
9
|
+
|
11
10
|
<!-- toc -->
|
11
|
+
* [learnpack](#learnpack)
|
12
12
|
* [Usage](#usage)
|
13
13
|
* [Commands](#commands)
|
14
|
-
<!-- tocstop -->
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
# Usage
|
14
|
+
<!-- tocstop -->
|
15
|
+
|
16
|
+
# Usage
|
17
|
+
|
19
18
|
<!-- usage -->
|
20
19
|
```sh-session
|
21
20
|
$ npm install -g @learnpack/learnpack
|
22
21
|
$ learnpack COMMAND
|
23
22
|
running command...
|
24
23
|
$ learnpack (-v|--version|version)
|
25
|
-
@learnpack/learnpack/
|
24
|
+
@learnpack/learnpack/2.0.0 win32-x64 node-v16.14.0
|
26
25
|
$ learnpack --help [COMMAND]
|
27
26
|
USAGE
|
28
27
|
$ learnpack COMMAND
|
29
28
|
...
|
30
29
|
```
|
31
|
-
<!-- usagestop -->
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
running command...
|
36
|
-
$ learnpack (-v|--version|version)
|
37
|
-
learnpack/0.1.24 darwin-x64 node-v10.17.0
|
38
|
-
$ learnpack --help [COMMAND]
|
39
|
-
USAGE
|
40
|
-
$ learnpack COMMAND
|
41
|
-
...
|
42
|
-
```
|
43
|
-
<!-- usagestop -->
|
44
|
-
# Commands
|
30
|
+
<!-- usagestop -->
|
31
|
+
|
32
|
+
# Commands
|
33
|
+
|
45
34
|
<!-- commands -->
|
46
35
|
* [`learnpack audit`](#learnpack-audit)
|
47
36
|
* [`learnpack clean`](#learnpack-clean)
|
48
37
|
* [`learnpack download [PACKAGE]`](#learnpack-download-package)
|
49
|
-
* [`learnpack hello`](#learnpack-hello)
|
50
38
|
* [`learnpack help [COMMAND]`](#learnpack-help-command)
|
51
39
|
* [`learnpack init`](#learnpack-init)
|
52
40
|
* [`learnpack login [PACKAGE]`](#learnpack-login-package)
|
@@ -62,7 +50,7 @@ USAGE
|
|
62
50
|
|
63
51
|
## `learnpack audit`
|
64
52
|
|
65
|
-
|
53
|
+
learnpack audit is the command in charge of creating an auditory of the repository
|
66
54
|
|
67
55
|
```
|
68
56
|
USAGE
|
@@ -70,10 +58,23 @@ USAGE
|
|
70
58
|
|
71
59
|
DESCRIPTION
|
72
60
|
...
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
61
|
+
learnpack audit checks for the following information in a repository:
|
62
|
+
1. The configuration object has slug, repository and description. (Error)
|
63
|
+
2. The command learnpack clean has been run. (Error)
|
64
|
+
3. If a markdown or test file doesn't have any content. (Error)
|
65
|
+
4. The links are accessing to valid servers. (Error)
|
66
|
+
5. The relative images are working (If they have the shortest path to the image or if the images exists in the
|
67
|
+
assets). (Error)
|
68
|
+
6. The external images are working (If they are pointing to a valid server). (Error)
|
69
|
+
7. The exercises directory names are valid. (Error)
|
70
|
+
8. If an exercise doesn't have a README file. (Error)
|
71
|
+
9. The exercises array (Of the config file) has content. (Error)
|
72
|
+
10. The exercses have the same translations. (Warning)
|
73
|
+
11. The .gitignore file exists. (Warning)
|
74
|
+
12. If there is a file within the exercises folder but not inside of any particular exercise's folder. (Warning)
|
75
|
+
```
|
76
|
+
|
77
|
+
_See code: [src\commands\audit.ts](https://github.com/learnpack/learnpack-cli/blob/v2.0.0/src\commands\audit.ts)_
|
77
78
|
|
78
79
|
## `learnpack clean`
|
79
80
|
|
@@ -85,10 +86,10 @@ USAGE
|
|
85
86
|
|
86
87
|
DESCRIPTION
|
87
88
|
...
|
88
|
-
|
89
|
+
Extra documentation goes here
|
89
90
|
```
|
90
91
|
|
91
|
-
_See code: [src\commands\clean.
|
92
|
+
_See code: [src\commands\clean.ts](https://github.com/learnpack/learnpack-cli/blob/v2.0.0/src\commands\clean.ts)_
|
92
93
|
|
93
94
|
## `learnpack download [PACKAGE]`
|
94
95
|
|
@@ -106,25 +107,7 @@ DESCRIPTION
|
|
106
107
|
Extra documentation goes here
|
107
108
|
```
|
108
109
|
|
109
|
-
_See code: [src\commands\download.
|
110
|
-
|
111
|
-
## `learnpack hello`
|
112
|
-
|
113
|
-
Describe the command here
|
114
|
-
|
115
|
-
```
|
116
|
-
USAGE
|
117
|
-
$ learnpack hello
|
118
|
-
|
119
|
-
OPTIONS
|
120
|
-
-n, --name=name name to print
|
121
|
-
|
122
|
-
DESCRIPTION
|
123
|
-
...
|
124
|
-
Extra documentation goes here
|
125
|
-
```
|
126
|
-
|
127
|
-
_See code: [src\commands\hello.js](https://github.com/learnpack/learnpack-cli/blob/v1.0.0/src\commands\hello.js)_
|
110
|
+
_See code: [src\commands\download.ts](https://github.com/learnpack/learnpack-cli/blob/v2.0.0/src\commands\download.ts)_
|
128
111
|
|
129
112
|
## `learnpack help [COMMAND]`
|
130
113
|
|
@@ -155,7 +138,7 @@ OPTIONS
|
|
155
138
|
-h, --grading show CLI help
|
156
139
|
```
|
157
140
|
|
158
|
-
_See code: [src\commands\init.
|
141
|
+
_See code: [src\commands\init.ts](https://github.com/learnpack/learnpack-cli/blob/v2.0.0/src\commands\init.ts)_
|
159
142
|
|
160
143
|
## `learnpack login [PACKAGE]`
|
161
144
|
|
@@ -170,10 +153,10 @@ ARGUMENTS
|
|
170
153
|
|
171
154
|
DESCRIPTION
|
172
155
|
...
|
173
|
-
|
156
|
+
Extra documentation goes here
|
174
157
|
```
|
175
158
|
|
176
|
-
_See code: [src\commands\login.
|
159
|
+
_See code: [src\commands\login.ts](https://github.com/learnpack/learnpack-cli/blob/v2.0.0/src\commands\login.ts)_
|
177
160
|
|
178
161
|
## `learnpack logout [PACKAGE]`
|
179
162
|
|
@@ -188,10 +171,10 @@ ARGUMENTS
|
|
188
171
|
|
189
172
|
DESCRIPTION
|
190
173
|
...
|
191
|
-
|
174
|
+
Extra documentation goes here
|
192
175
|
```
|
193
176
|
|
194
|
-
_See code: [src\commands\logout.
|
177
|
+
_See code: [src\commands\logout.ts](https://github.com/learnpack/learnpack-cli/blob/v2.0.0/src\commands\logout.ts)_
|
195
178
|
|
196
179
|
## `learnpack plugins`
|
197
180
|
|
@@ -323,10 +306,10 @@ ARGUMENTS
|
|
323
306
|
|
324
307
|
DESCRIPTION
|
325
308
|
...
|
326
|
-
|
309
|
+
Extra documentation goes here
|
327
310
|
```
|
328
311
|
|
329
|
-
_See code: [src\commands\publish.
|
312
|
+
_See code: [src\commands\publish.ts](https://github.com/learnpack/learnpack-cli/blob/v2.0.0/src\commands\publish.ts)_
|
330
313
|
|
331
314
|
## `learnpack start`
|
332
315
|
|
@@ -337,22 +320,17 @@ USAGE
|
|
337
320
|
$ learnpack start
|
338
321
|
|
339
322
|
OPTIONS
|
323
|
+
-D, --disableGrading disble grading functionality
|
340
324
|
-d, --debug debugger mode for more verbage
|
341
|
-
-
|
325
|
+
-e, --editor=standalone|gitpod [standalone, gitpod]
|
342
326
|
-g, --grading=isolated|incremental [isolated, incremental]
|
343
327
|
-h, --host=host server host
|
344
|
-
|
345
|
-
-m, --mode=standalone|preview Load a standalone editor or just the preview to be embeded in another editor:
|
346
|
-
Choices: [standalone, preview]
|
347
|
-
|
348
328
|
-p, --port=port server port
|
349
|
-
|
350
329
|
-v, --version=version E.g: 1.0.1
|
351
|
-
|
352
330
|
-w, --watch Watch for file changes
|
353
331
|
```
|
354
332
|
|
355
|
-
_See code: [src\commands\start.
|
333
|
+
_See code: [src\commands\start.ts](https://github.com/learnpack/learnpack-cli/blob/v2.0.0/src\commands\start.ts)_
|
356
334
|
|
357
335
|
## `learnpack test [EXERCISESLUG]`
|
358
336
|
|
@@ -366,330 +344,5 @@ ARGUMENTS
|
|
366
344
|
EXERCISESLUG The name of the exercise to test
|
367
345
|
```
|
368
346
|
|
369
|
-
_See code: [src\commands\test.
|
370
|
-
<!-- commandsstop -->
|
371
|
-
* [`learnpack audit`](#learnpack-audit)
|
372
|
-
* [`learnpack clean`](#learnpack-clean)
|
373
|
-
* [`learnpack download [PACKAGE]`](#learnpack-download-package)
|
374
|
-
* [`learnpack hello`](#learnpack-hello)
|
375
|
-
* [`learnpack help [COMMAND]`](#learnpack-help-command)
|
376
|
-
* [`learnpack init`](#learnpack-init)
|
377
|
-
* [`learnpack login [PACKAGE]`](#learnpack-login-package)
|
378
|
-
* [`learnpack logout [PACKAGE]`](#learnpack-logout-package)
|
379
|
-
* [`learnpack plugins`](#learnpack-plugins)
|
380
|
-
* [`learnpack plugins:install PLUGIN...`](#learnpack-pluginsinstall-plugin)
|
381
|
-
* [`learnpack plugins:link PLUGIN`](#learnpack-pluginslink-plugin)
|
382
|
-
* [`learnpack plugins:uninstall PLUGIN...`](#learnpack-pluginsuninstall-plugin)
|
383
|
-
* [`learnpack plugins:update`](#learnpack-pluginsupdate)
|
384
|
-
* [`learnpack publish [PACKAGE]`](#learnpack-publish-package)
|
385
|
-
* [`learnpack start`](#learnpack-start)
|
386
|
-
* [`learnpack test [EXERCISESLUG]`](#learnpack-test-exerciseslug)
|
387
|
-
|
388
|
-
## `learnpack audit`
|
389
|
-
|
390
|
-
Check if the configuration object has slug, description and repository property
|
391
|
-
|
392
|
-
```
|
393
|
-
USAGE
|
394
|
-
$ learnpack audit
|
395
|
-
|
396
|
-
DESCRIPTION
|
397
|
-
...
|
398
|
-
Extra documentation goes here
|
399
|
-
```
|
400
|
-
|
401
|
-
_See code: [src/commands/audit.js](https://github.com/learnpack/learnpack-cli/blob/v0.1.24/src/commands/audit.js)_
|
402
|
-
|
403
|
-
## `learnpack clean`
|
404
|
-
|
405
|
-
Clean the configuration object
|
406
|
-
|
407
|
-
```
|
408
|
-
USAGE
|
409
|
-
$ learnpack clean
|
410
|
-
|
411
|
-
DESCRIPTION
|
412
|
-
...
|
413
|
-
Extra documentation goes here
|
414
|
-
```
|
415
|
-
|
416
|
-
_See code: [src/commands/clean.js](https://github.com/learnpack/learnpack-cli/blob/v0.1.24/src/commands/clean.js)_
|
417
|
-
|
418
|
-
## `learnpack download [PACKAGE]`
|
419
|
-
|
420
|
-
Describe the command here
|
421
|
-
|
422
|
-
```
|
423
|
-
USAGE
|
424
|
-
$ learnpack download [PACKAGE]
|
425
|
-
|
426
|
-
ARGUMENTS
|
427
|
-
PACKAGE The unique string that identifies this package on learnpack
|
428
|
-
|
429
|
-
DESCRIPTION
|
430
|
-
...
|
431
|
-
Extra documentation goes here
|
432
|
-
```
|
433
|
-
|
434
|
-
_See code: [src/commands/download.js](https://github.com/learnpack/learnpack-cli/blob/v0.1.24/src/commands/download.js)_
|
435
|
-
|
436
|
-
## `learnpack hello`
|
437
|
-
|
438
|
-
Describe the command here
|
439
|
-
|
440
|
-
```
|
441
|
-
USAGE
|
442
|
-
$ learnpack hello
|
443
|
-
|
444
|
-
OPTIONS
|
445
|
-
-n, --name=name name to print
|
446
|
-
|
447
|
-
DESCRIPTION
|
448
|
-
...
|
449
|
-
Extra documentation goes here
|
450
|
-
```
|
451
|
-
|
452
|
-
_See code: [src/commands/hello.js](https://github.com/learnpack/learnpack-cli/blob/v0.1.24/src/commands/hello.js)_
|
453
|
-
|
454
|
-
## `learnpack help [COMMAND]`
|
455
|
-
|
456
|
-
display help for learnpack
|
457
|
-
|
458
|
-
```
|
459
|
-
USAGE
|
460
|
-
$ learnpack help [COMMAND]
|
461
|
-
|
462
|
-
ARGUMENTS
|
463
|
-
COMMAND command to show help for
|
464
|
-
|
465
|
-
OPTIONS
|
466
|
-
--all see all commands in CLI
|
467
|
-
```
|
468
|
-
|
469
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.1.0/src/commands/help.ts)_
|
470
|
-
|
471
|
-
## `learnpack init`
|
472
|
-
|
473
|
-
Create a new learning package: Book, Tutorial or Exercise
|
474
|
-
|
475
|
-
```
|
476
|
-
USAGE
|
477
|
-
$ learnpack init
|
478
|
-
|
479
|
-
OPTIONS
|
480
|
-
-h, --grading show CLI help
|
481
|
-
```
|
482
|
-
|
483
|
-
_See code: [src/commands/init.js](https://github.com/learnpack/learnpack-cli/blob/v0.1.24/src/commands/init.js)_
|
484
|
-
|
485
|
-
## `learnpack login [PACKAGE]`
|
486
|
-
|
487
|
-
Describe the command here
|
488
|
-
|
489
|
-
```
|
490
|
-
USAGE
|
491
|
-
$ learnpack login [PACKAGE]
|
492
|
-
|
493
|
-
ARGUMENTS
|
494
|
-
PACKAGE The unique string that identifies this package on learnpack
|
495
|
-
|
496
|
-
DESCRIPTION
|
497
|
-
...
|
498
|
-
Extra documentation goes here
|
499
|
-
```
|
500
|
-
|
501
|
-
_See code: [src/commands/login.js](https://github.com/learnpack/learnpack-cli/blob/v0.1.24/src/commands/login.js)_
|
502
|
-
|
503
|
-
## `learnpack logout [PACKAGE]`
|
504
|
-
|
505
|
-
Describe the command here
|
506
|
-
|
507
|
-
```
|
508
|
-
USAGE
|
509
|
-
$ learnpack logout [PACKAGE]
|
510
|
-
|
511
|
-
ARGUMENTS
|
512
|
-
PACKAGE The unique string that identifies this package on learnpack
|
513
|
-
|
514
|
-
DESCRIPTION
|
515
|
-
...
|
516
|
-
Extra documentation goes here
|
517
|
-
```
|
518
|
-
|
519
|
-
_See code: [src/commands/logout.js](https://github.com/learnpack/learnpack-cli/blob/v0.1.24/src/commands/logout.js)_
|
520
|
-
|
521
|
-
## `learnpack plugins`
|
522
|
-
|
523
|
-
list installed plugins
|
524
|
-
|
525
|
-
```
|
526
|
-
USAGE
|
527
|
-
$ learnpack plugins
|
528
|
-
|
529
|
-
OPTIONS
|
530
|
-
--core show core plugins
|
531
|
-
|
532
|
-
EXAMPLE
|
533
|
-
$ learnpack plugins
|
534
|
-
```
|
535
|
-
|
536
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src/commands/plugins/index.ts)_
|
537
|
-
|
538
|
-
## `learnpack plugins:install PLUGIN...`
|
539
|
-
|
540
|
-
installs a plugin into the CLI
|
541
|
-
|
542
|
-
```
|
543
|
-
USAGE
|
544
|
-
$ learnpack plugins:install PLUGIN...
|
545
|
-
|
546
|
-
ARGUMENTS
|
547
|
-
PLUGIN plugin to install
|
548
|
-
|
549
|
-
OPTIONS
|
550
|
-
-f, --force yarn install with force flag
|
551
|
-
-h, --help show CLI help
|
552
|
-
-v, --verbose
|
553
|
-
|
554
|
-
DESCRIPTION
|
555
|
-
Can be installed from npm or a git url.
|
556
|
-
|
557
|
-
Installation of a user-installed plugin will override a core plugin.
|
558
|
-
|
559
|
-
e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
|
560
|
-
will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
|
561
|
-
the CLI without the need to patch and update the whole CLI.
|
562
|
-
|
563
|
-
ALIASES
|
564
|
-
$ learnpack plugins:add
|
565
|
-
|
566
|
-
EXAMPLES
|
567
|
-
$ learnpack plugins:install myplugin
|
568
|
-
$ learnpack plugins:install https://github.com/someuser/someplugin
|
569
|
-
$ learnpack plugins:install someuser/someplugin
|
570
|
-
```
|
571
|
-
|
572
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src/commands/plugins/install.ts)_
|
573
|
-
|
574
|
-
## `learnpack plugins:link PLUGIN`
|
575
|
-
|
576
|
-
links a plugin into the CLI for development
|
577
|
-
|
578
|
-
```
|
579
|
-
USAGE
|
580
|
-
$ learnpack plugins:link PLUGIN
|
581
|
-
|
582
|
-
ARGUMENTS
|
583
|
-
PATH [default: .] path to plugin
|
584
|
-
|
585
|
-
OPTIONS
|
586
|
-
-h, --help show CLI help
|
587
|
-
-v, --verbose
|
588
|
-
|
589
|
-
DESCRIPTION
|
590
|
-
Installation of a linked plugin will override a user-installed or core plugin.
|
591
|
-
|
592
|
-
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
|
593
|
-
command will override the user-installed or core plugin implementation. This is useful for development work.
|
594
|
-
|
595
|
-
EXAMPLE
|
596
|
-
$ learnpack plugins:link myplugin
|
597
|
-
```
|
598
|
-
|
599
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src/commands/plugins/link.ts)_
|
600
|
-
|
601
|
-
## `learnpack plugins:uninstall PLUGIN...`
|
602
|
-
|
603
|
-
removes a plugin from the CLI
|
604
|
-
|
605
|
-
```
|
606
|
-
USAGE
|
607
|
-
$ learnpack plugins:uninstall PLUGIN...
|
608
|
-
|
609
|
-
ARGUMENTS
|
610
|
-
PLUGIN plugin to uninstall
|
611
|
-
|
612
|
-
OPTIONS
|
613
|
-
-h, --help show CLI help
|
614
|
-
-v, --verbose
|
615
|
-
|
616
|
-
ALIASES
|
617
|
-
$ learnpack plugins:unlink
|
618
|
-
$ learnpack plugins:remove
|
619
|
-
```
|
620
|
-
|
621
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src/commands/plugins/uninstall.ts)_
|
622
|
-
|
623
|
-
## `learnpack plugins:update`
|
624
|
-
|
625
|
-
update installed plugins
|
626
|
-
|
627
|
-
```
|
628
|
-
USAGE
|
629
|
-
$ learnpack plugins:update
|
630
|
-
|
631
|
-
OPTIONS
|
632
|
-
-h, --help show CLI help
|
633
|
-
-v, --verbose
|
634
|
-
```
|
635
|
-
|
636
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src/commands/plugins/update.ts)_
|
637
|
-
|
638
|
-
## `learnpack publish [PACKAGE]`
|
639
|
-
|
640
|
-
Describe the command here
|
641
|
-
|
642
|
-
```
|
643
|
-
USAGE
|
644
|
-
$ learnpack publish [PACKAGE]
|
645
|
-
|
646
|
-
ARGUMENTS
|
647
|
-
PACKAGE The unique string that identifies this package on learnpack
|
648
|
-
|
649
|
-
DESCRIPTION
|
650
|
-
...
|
651
|
-
Extra documentation goes here
|
652
|
-
```
|
653
|
-
|
654
|
-
_See code: [src/commands/publish.js](https://github.com/learnpack/learnpack-cli/blob/v0.1.24/src/commands/publish.js)_
|
655
|
-
|
656
|
-
## `learnpack start`
|
657
|
-
|
658
|
-
Runs a small server with all the exercise instructions
|
659
|
-
|
660
|
-
```
|
661
|
-
USAGE
|
662
|
-
$ learnpack start
|
663
|
-
|
664
|
-
OPTIONS
|
665
|
-
-d, --debug debugger mode for more verbage
|
666
|
-
-d, --disableGrading disble grading functionality
|
667
|
-
-g, --grading=isolated|incremental [isolated, incremental]
|
668
|
-
-h, --host=host server host
|
669
|
-
|
670
|
-
-m, --mode=standalone|preview Load a standalone editor or just the preview to be embeded in another editor:
|
671
|
-
Choices: [standalone, preview]
|
672
|
-
|
673
|
-
-p, --port=port server port
|
674
|
-
|
675
|
-
-v, --version=version E.g: 1.0.1
|
676
|
-
|
677
|
-
-w, --watch Watch for file changes
|
678
|
-
```
|
679
|
-
|
680
|
-
_See code: [src/commands/start.js](https://github.com/learnpack/learnpack-cli/blob/v0.1.24/src/commands/start.js)_
|
681
|
-
|
682
|
-
## `learnpack test [EXERCISESLUG]`
|
683
|
-
|
684
|
-
Test exercises
|
685
|
-
|
686
|
-
```
|
687
|
-
USAGE
|
688
|
-
$ learnpack test [EXERCISESLUG]
|
689
|
-
|
690
|
-
ARGUMENTS
|
691
|
-
EXERCISESLUG The name of the exercise to test
|
692
|
-
```
|
693
|
-
|
694
|
-
_See code: [src/commands/test.js](https://github.com/learnpack/learnpack-cli/blob/v0.1.24/src/commands/test.js)_
|
347
|
+
_See code: [src\commands\test.ts](https://github.com/learnpack/learnpack-cli/blob/v2.0.0/src\commands\test.ts)_
|
695
348
|
<!-- commandsstop -->
|
package/bin/run
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
2
|
|
3
|
-
require('
|
4
|
-
|
3
|
+
const fs = require('fs')
|
4
|
+
const path = require('path')
|
5
|
+
const project = path.join(__dirname, '../tsconfig.json')
|
6
|
+
const dev = fs.existsSync(project)
|
7
|
+
|
8
|
+
if (dev) {
|
9
|
+
require('ts-node').register({project})
|
10
|
+
}
|
11
|
+
|
12
|
+
require(`../${dev ? 'src' : 'lib'}`).run()
|
5
13
|
.catch(require('@oclif/errors/handle'))
|
14
|
+
|
15
|
+
/*require('@oclif/command').run()
|
16
|
+
.then(require('@oclif/command/flush'))
|
17
|
+
.catch(require('@oclif/errors/handle'))*/
|
package/oclif.manifest.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":"
|
1
|
+
{"version":"2.0.0","commands":{"audit":{"id":"audit","description":"learnpack audit is the command in charge of creating an auditory of the repository\n...\nlearnpack audit checks for the following information in a repository:\n 1. The configuration object has slug, repository and description. (Error)\n 2. The command learnpack clean has been run. (Error)\n 3. If a markdown or test file doesn't have any content. (Error)\n 4. The links are accessing to valid servers. (Error)\n 5. The relative images are working (If they have the shortest path to the image or if the images exists in the assets). (Error)\n 6. The external images are working (If they are pointing to a valid server). (Error)\n 7. The exercises directory names are valid. (Error)\n 8. If an exercise doesn't have a README file. (Error)\n 9. The exercises array (Of the config file) has content. (Error)\n 10. The exercses have the same translations. (Warning)\n 11. The .gitignore file exists. (Warning)\n 12. If there is a file within the exercises folder but not inside of any particular exercise's folder. (Warning)\n","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{},"args":[]},"clean":{"id":"clean","description":"Clean the configuration object\n ...\n Extra documentation goes here\n ","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{},"args":[]},"download":{"id":"download","description":"Describe the command here\n...\nExtra documentation goes here\n","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"package","description":"The unique string that identifies this package on learnpack","required":false,"hidden":false}]},"init":{"id":"init","description":"Create a new learning package: Book, Tutorial or Exercise","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"grading":{"name":"grading","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"login":{"id":"login","description":"Describe the command here\n ...\n Extra documentation goes here\n ","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"package","description":"The unique string that identifies this package on learnpack","required":false,"hidden":false}]},"logout":{"id":"logout","description":"Describe the command here\n ...\n Extra documentation goes here\n ","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"package","description":"The unique string that identifies this package on learnpack","required":false,"hidden":false}]},"publish":{"id":"publish","description":"Describe the command here\n ...\n Extra documentation goes here\n ","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"package","description":"The unique string that identifies this package on learnpack","required":false,"hidden":false}]},"start":{"id":"start","description":"Runs a small server with all the exercise instructions","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"port":{"name":"port","type":"option","char":"p","description":"server port"},"host":{"name":"host","type":"option","char":"h","description":"server host"},"disableGrading":{"name":"disableGrading","type":"boolean","char":"D","description":"disble grading functionality","allowNo":false},"watch":{"name":"watch","type":"boolean","char":"w","description":"Watch for file changes","allowNo":false},"editor":{"name":"editor","type":"option","char":"e","description":"[standalone, gitpod]","options":["standalone","gitpod"]},"version":{"name":"version","type":"option","char":"v","description":"E.g: 1.0.1"},"grading":{"name":"grading","type":"option","char":"g","description":"[isolated, incremental]","options":["isolated","incremental"]},"debug":{"name":"debug","type":"boolean","char":"d","description":"debugger mode for more verbage","allowNo":false}},"args":[]},"test":{"id":"test","description":"Test exercises","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"exerciseSlug","description":"The name of the exercise to test","required":false,"hidden":false}]}}}
|