@learnpack/learnpack 1.0.0
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 +695 -0
- package/bin/run +5 -0
- package/bin/run.cmd +3 -0
- package/oclif.manifest.json +1 -0
- package/package.json +111 -0
- package/plugin/command/compile.js +17 -0
- package/plugin/command/test.js +29 -0
- package/plugin/index.js +6 -0
- package/plugin/plugin.js +71 -0
- package/plugin/utils.js +78 -0
- package/src/commands/audit.js +243 -0
- package/src/commands/clean.js +27 -0
- package/src/commands/download.js +52 -0
- package/src/commands/hello.js +20 -0
- package/src/commands/init.js +133 -0
- package/src/commands/login.js +45 -0
- package/src/commands/logout.js +39 -0
- package/src/commands/publish.js +78 -0
- package/src/commands/start.js +169 -0
- package/src/commands/test.js +85 -0
- package/src/index.js +1 -0
- package/src/managers/config/allowed_files.js +12 -0
- package/src/managers/config/defaults.js +32 -0
- package/src/managers/config/exercise.js +212 -0
- package/src/managers/config/index.js +342 -0
- package/src/managers/file.js +137 -0
- package/src/managers/server/index.js +62 -0
- package/src/managers/server/routes.js +151 -0
- package/src/managers/session.js +83 -0
- package/src/managers/socket.js +185 -0
- package/src/managers/test.js +77 -0
- package/src/ui/download.js +48 -0
- package/src/utils/BaseCommand.js +34 -0
- package/src/utils/SessionCommand.js +46 -0
- package/src/utils/api.js +164 -0
- package/src/utils/audit.js +114 -0
- package/src/utils/console.js +16 -0
- package/src/utils/errors.js +90 -0
- package/src/utils/exercisesQueue.js +45 -0
- package/src/utils/fileQueue.js +194 -0
- package/src/utils/misc.js +26 -0
- package/src/utils/templates/gitignore.txt +20 -0
- package/src/utils/templates/incremental/.learn/exercises/01-hello-world/README.es.md +26 -0
- package/src/utils/templates/incremental/.learn/exercises/01-hello-world/README.md +25 -0
- package/src/utils/templates/incremental/README.ejs +5 -0
- package/src/utils/templates/incremental/README.es.ejs +5 -0
- package/src/utils/templates/isolated/01-hello-world/README.es.md +27 -0
- package/src/utils/templates/isolated/01-hello-world/README.md +27 -0
- package/src/utils/templates/isolated/README.ejs +5 -0
- package/src/utils/templates/isolated/README.es.ejs +5 -0
- package/src/utils/templates/no-grading/README.ejs +5 -0
- package/src/utils/templates/no-grading/README.es.ejs +5 -0
- package/src/utils/validators.js +15 -0
- package/src/utils/watcher.js +24 -0
package/README.md
ADDED
@@ -0,0 +1,695 @@
|
|
1
|
+
learnpack
|
2
|
+
=========
|
3
|
+
|
4
|
+
Create, sell or download and take learning amazing learning packages
|
5
|
+
|
6
|
+
[](https://oclif.io)
|
7
|
+
[](https://npmjs.org/package/learnpack)
|
8
|
+
[](https://npmjs.org/package/learnpack)
|
9
|
+
[](https://github.com/learnpack/learnpack-cli/blob/master/package.json)
|
10
|
+
|
11
|
+
<!-- toc -->
|
12
|
+
* [Usage](#usage)
|
13
|
+
* [Commands](#commands)
|
14
|
+
<!-- tocstop -->
|
15
|
+
* [Usage](#usage)
|
16
|
+
* [Commands](#commands)
|
17
|
+
<!-- tocstop -->
|
18
|
+
# Usage
|
19
|
+
<!-- usage -->
|
20
|
+
```sh-session
|
21
|
+
$ npm install -g @learnpack/learnpack
|
22
|
+
$ learnpack COMMAND
|
23
|
+
running command...
|
24
|
+
$ learnpack (-v|--version|version)
|
25
|
+
@learnpack/learnpack/1.0.0 win32-x64 node-v16.14.0
|
26
|
+
$ learnpack --help [COMMAND]
|
27
|
+
USAGE
|
28
|
+
$ learnpack COMMAND
|
29
|
+
...
|
30
|
+
```
|
31
|
+
<!-- usagestop -->
|
32
|
+
```sh-session
|
33
|
+
$ npm install -g learnpack
|
34
|
+
$ learnpack COMMAND
|
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
|
45
|
+
<!-- commands -->
|
46
|
+
* [`learnpack audit`](#learnpack-audit)
|
47
|
+
* [`learnpack clean`](#learnpack-clean)
|
48
|
+
* [`learnpack download [PACKAGE]`](#learnpack-download-package)
|
49
|
+
* [`learnpack hello`](#learnpack-hello)
|
50
|
+
* [`learnpack help [COMMAND]`](#learnpack-help-command)
|
51
|
+
* [`learnpack init`](#learnpack-init)
|
52
|
+
* [`learnpack login [PACKAGE]`](#learnpack-login-package)
|
53
|
+
* [`learnpack logout [PACKAGE]`](#learnpack-logout-package)
|
54
|
+
* [`learnpack plugins`](#learnpack-plugins)
|
55
|
+
* [`learnpack plugins:install PLUGIN...`](#learnpack-pluginsinstall-plugin)
|
56
|
+
* [`learnpack plugins:link PLUGIN`](#learnpack-pluginslink-plugin)
|
57
|
+
* [`learnpack plugins:uninstall PLUGIN...`](#learnpack-pluginsuninstall-plugin)
|
58
|
+
* [`learnpack plugins:update`](#learnpack-pluginsupdate)
|
59
|
+
* [`learnpack publish [PACKAGE]`](#learnpack-publish-package)
|
60
|
+
* [`learnpack start`](#learnpack-start)
|
61
|
+
* [`learnpack test [EXERCISESLUG]`](#learnpack-test-exerciseslug)
|
62
|
+
|
63
|
+
## `learnpack audit`
|
64
|
+
|
65
|
+
Check if the configuration object has slug, description and repository property
|
66
|
+
|
67
|
+
```
|
68
|
+
USAGE
|
69
|
+
$ learnpack audit
|
70
|
+
|
71
|
+
DESCRIPTION
|
72
|
+
...
|
73
|
+
Extra documentation goes here
|
74
|
+
```
|
75
|
+
|
76
|
+
_See code: [src\commands\audit.js](https://github.com/learnpack/learnpack-cli/blob/v1.0.0/src\commands\audit.js)_
|
77
|
+
|
78
|
+
## `learnpack clean`
|
79
|
+
|
80
|
+
Clean the configuration object
|
81
|
+
|
82
|
+
```
|
83
|
+
USAGE
|
84
|
+
$ learnpack clean
|
85
|
+
|
86
|
+
DESCRIPTION
|
87
|
+
...
|
88
|
+
Extra documentation goes here
|
89
|
+
```
|
90
|
+
|
91
|
+
_See code: [src\commands\clean.js](https://github.com/learnpack/learnpack-cli/blob/v1.0.0/src\commands\clean.js)_
|
92
|
+
|
93
|
+
## `learnpack download [PACKAGE]`
|
94
|
+
|
95
|
+
Describe the command here
|
96
|
+
|
97
|
+
```
|
98
|
+
USAGE
|
99
|
+
$ learnpack download [PACKAGE]
|
100
|
+
|
101
|
+
ARGUMENTS
|
102
|
+
PACKAGE The unique string that identifies this package on learnpack
|
103
|
+
|
104
|
+
DESCRIPTION
|
105
|
+
...
|
106
|
+
Extra documentation goes here
|
107
|
+
```
|
108
|
+
|
109
|
+
_See code: [src\commands\download.js](https://github.com/learnpack/learnpack-cli/blob/v1.0.0/src\commands\download.js)_
|
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)_
|
128
|
+
|
129
|
+
## `learnpack help [COMMAND]`
|
130
|
+
|
131
|
+
display help for learnpack
|
132
|
+
|
133
|
+
```
|
134
|
+
USAGE
|
135
|
+
$ learnpack help [COMMAND]
|
136
|
+
|
137
|
+
ARGUMENTS
|
138
|
+
COMMAND command to show help for
|
139
|
+
|
140
|
+
OPTIONS
|
141
|
+
--all see all commands in CLI
|
142
|
+
```
|
143
|
+
|
144
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.1.0/src\commands\help.ts)_
|
145
|
+
|
146
|
+
## `learnpack init`
|
147
|
+
|
148
|
+
Create a new learning package: Book, Tutorial or Exercise
|
149
|
+
|
150
|
+
```
|
151
|
+
USAGE
|
152
|
+
$ learnpack init
|
153
|
+
|
154
|
+
OPTIONS
|
155
|
+
-h, --grading show CLI help
|
156
|
+
```
|
157
|
+
|
158
|
+
_See code: [src\commands\init.js](https://github.com/learnpack/learnpack-cli/blob/v1.0.0/src\commands\init.js)_
|
159
|
+
|
160
|
+
## `learnpack login [PACKAGE]`
|
161
|
+
|
162
|
+
Describe the command here
|
163
|
+
|
164
|
+
```
|
165
|
+
USAGE
|
166
|
+
$ learnpack login [PACKAGE]
|
167
|
+
|
168
|
+
ARGUMENTS
|
169
|
+
PACKAGE The unique string that identifies this package on learnpack
|
170
|
+
|
171
|
+
DESCRIPTION
|
172
|
+
...
|
173
|
+
Extra documentation goes here
|
174
|
+
```
|
175
|
+
|
176
|
+
_See code: [src\commands\login.js](https://github.com/learnpack/learnpack-cli/blob/v1.0.0/src\commands\login.js)_
|
177
|
+
|
178
|
+
## `learnpack logout [PACKAGE]`
|
179
|
+
|
180
|
+
Describe the command here
|
181
|
+
|
182
|
+
```
|
183
|
+
USAGE
|
184
|
+
$ learnpack logout [PACKAGE]
|
185
|
+
|
186
|
+
ARGUMENTS
|
187
|
+
PACKAGE The unique string that identifies this package on learnpack
|
188
|
+
|
189
|
+
DESCRIPTION
|
190
|
+
...
|
191
|
+
Extra documentation goes here
|
192
|
+
```
|
193
|
+
|
194
|
+
_See code: [src\commands\logout.js](https://github.com/learnpack/learnpack-cli/blob/v1.0.0/src\commands\logout.js)_
|
195
|
+
|
196
|
+
## `learnpack plugins`
|
197
|
+
|
198
|
+
list installed plugins
|
199
|
+
|
200
|
+
```
|
201
|
+
USAGE
|
202
|
+
$ learnpack plugins
|
203
|
+
|
204
|
+
OPTIONS
|
205
|
+
--core show core plugins
|
206
|
+
|
207
|
+
EXAMPLE
|
208
|
+
$ learnpack plugins
|
209
|
+
```
|
210
|
+
|
211
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src\commands\plugins\index.ts)_
|
212
|
+
|
213
|
+
## `learnpack plugins:install PLUGIN...`
|
214
|
+
|
215
|
+
installs a plugin into the CLI
|
216
|
+
|
217
|
+
```
|
218
|
+
USAGE
|
219
|
+
$ learnpack plugins:install PLUGIN...
|
220
|
+
|
221
|
+
ARGUMENTS
|
222
|
+
PLUGIN plugin to install
|
223
|
+
|
224
|
+
OPTIONS
|
225
|
+
-f, --force yarn install with force flag
|
226
|
+
-h, --help show CLI help
|
227
|
+
-v, --verbose
|
228
|
+
|
229
|
+
DESCRIPTION
|
230
|
+
Can be installed from npm or a git url.
|
231
|
+
|
232
|
+
Installation of a user-installed plugin will override a core plugin.
|
233
|
+
|
234
|
+
e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
|
235
|
+
will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
|
236
|
+
the CLI without the need to patch and update the whole CLI.
|
237
|
+
|
238
|
+
ALIASES
|
239
|
+
$ learnpack plugins:add
|
240
|
+
|
241
|
+
EXAMPLES
|
242
|
+
$ learnpack plugins:install myplugin
|
243
|
+
$ learnpack plugins:install https://github.com/someuser/someplugin
|
244
|
+
$ learnpack plugins:install someuser/someplugin
|
245
|
+
```
|
246
|
+
|
247
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src\commands\plugins\install.ts)_
|
248
|
+
|
249
|
+
## `learnpack plugins:link PLUGIN`
|
250
|
+
|
251
|
+
links a plugin into the CLI for development
|
252
|
+
|
253
|
+
```
|
254
|
+
USAGE
|
255
|
+
$ learnpack plugins:link PLUGIN
|
256
|
+
|
257
|
+
ARGUMENTS
|
258
|
+
PATH [default: .] path to plugin
|
259
|
+
|
260
|
+
OPTIONS
|
261
|
+
-h, --help show CLI help
|
262
|
+
-v, --verbose
|
263
|
+
|
264
|
+
DESCRIPTION
|
265
|
+
Installation of a linked plugin will override a user-installed or core plugin.
|
266
|
+
|
267
|
+
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
|
268
|
+
command will override the user-installed or core plugin implementation. This is useful for development work.
|
269
|
+
|
270
|
+
EXAMPLE
|
271
|
+
$ learnpack plugins:link myplugin
|
272
|
+
```
|
273
|
+
|
274
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src\commands\plugins\link.ts)_
|
275
|
+
|
276
|
+
## `learnpack plugins:uninstall PLUGIN...`
|
277
|
+
|
278
|
+
removes a plugin from the CLI
|
279
|
+
|
280
|
+
```
|
281
|
+
USAGE
|
282
|
+
$ learnpack plugins:uninstall PLUGIN...
|
283
|
+
|
284
|
+
ARGUMENTS
|
285
|
+
PLUGIN plugin to uninstall
|
286
|
+
|
287
|
+
OPTIONS
|
288
|
+
-h, --help show CLI help
|
289
|
+
-v, --verbose
|
290
|
+
|
291
|
+
ALIASES
|
292
|
+
$ learnpack plugins:unlink
|
293
|
+
$ learnpack plugins:remove
|
294
|
+
```
|
295
|
+
|
296
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src\commands\plugins\uninstall.ts)_
|
297
|
+
|
298
|
+
## `learnpack plugins:update`
|
299
|
+
|
300
|
+
update installed plugins
|
301
|
+
|
302
|
+
```
|
303
|
+
USAGE
|
304
|
+
$ learnpack plugins:update
|
305
|
+
|
306
|
+
OPTIONS
|
307
|
+
-h, --help show CLI help
|
308
|
+
-v, --verbose
|
309
|
+
```
|
310
|
+
|
311
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.8.0/src\commands\plugins\update.ts)_
|
312
|
+
|
313
|
+
## `learnpack publish [PACKAGE]`
|
314
|
+
|
315
|
+
Describe the command here
|
316
|
+
|
317
|
+
```
|
318
|
+
USAGE
|
319
|
+
$ learnpack publish [PACKAGE]
|
320
|
+
|
321
|
+
ARGUMENTS
|
322
|
+
PACKAGE The unique string that identifies this package on learnpack
|
323
|
+
|
324
|
+
DESCRIPTION
|
325
|
+
...
|
326
|
+
Extra documentation goes here
|
327
|
+
```
|
328
|
+
|
329
|
+
_See code: [src\commands\publish.js](https://github.com/learnpack/learnpack-cli/blob/v1.0.0/src\commands\publish.js)_
|
330
|
+
|
331
|
+
## `learnpack start`
|
332
|
+
|
333
|
+
Runs a small server with all the exercise instructions
|
334
|
+
|
335
|
+
```
|
336
|
+
USAGE
|
337
|
+
$ learnpack start
|
338
|
+
|
339
|
+
OPTIONS
|
340
|
+
-d, --debug debugger mode for more verbage
|
341
|
+
-d, --disableGrading disble grading functionality
|
342
|
+
-g, --grading=isolated|incremental [isolated, incremental]
|
343
|
+
-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
|
+
-p, --port=port server port
|
349
|
+
|
350
|
+
-v, --version=version E.g: 1.0.1
|
351
|
+
|
352
|
+
-w, --watch Watch for file changes
|
353
|
+
```
|
354
|
+
|
355
|
+
_See code: [src\commands\start.js](https://github.com/learnpack/learnpack-cli/blob/v1.0.0/src\commands\start.js)_
|
356
|
+
|
357
|
+
## `learnpack test [EXERCISESLUG]`
|
358
|
+
|
359
|
+
Test exercises
|
360
|
+
|
361
|
+
```
|
362
|
+
USAGE
|
363
|
+
$ learnpack test [EXERCISESLUG]
|
364
|
+
|
365
|
+
ARGUMENTS
|
366
|
+
EXERCISESLUG The name of the exercise to test
|
367
|
+
```
|
368
|
+
|
369
|
+
_See code: [src\commands\test.js](https://github.com/learnpack/learnpack-cli/blob/v1.0.0/src\commands\test.js)_
|
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)_
|
695
|
+
<!-- commandsstop -->
|
package/bin/run
ADDED
package/bin/run.cmd
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":"1.0.0","commands":{"audit":{"id":"audit","description":"Check if the configuration object has slug, description and repository property\n...\nExtra documentation goes here\n","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{},"args":[]},"clean":{"id":"clean","description":"Clean the configuration object\n...\nExtra 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}]},"hello":{"id":"hello","description":"Describe the command here\n...\nExtra documentation goes here\n","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"name":{"name":"name","type":"option","char":"n","description":"name to print"}},"args":[]},"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...\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}]},"logout":{"id":"logout","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}]},"publish":{"id":"publish","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}]},"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":"dg","description":"disble grading functionality","allowNo":false},"watch":{"name":"watch","type":"boolean","char":"w","description":"Watch for file changes","allowNo":false},"mode":{"name":"mode","type":"option","char":"m","description":"Load a standalone editor or just the preview to be embeded in another editor: Choices: [standalone, preview]","options":["standalone","preview"]},"version":{"name":"version","type":"option","char":"v","description":"E.g: 1.0.1","default":null},"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}]}}}
|