adapt-cli 2.1.12 → 3.0.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/.eslintignore +1 -0
- package/.eslintrc.json +14 -0
- package/README.md +150 -150
- package/bin/adapt.js +3 -0
- package/json/help-create/question.json +9 -0
- package/json/help-create.json +2 -1
- package/lib/api.js +260 -0
- package/lib/cli.js +61 -44
- package/lib/commands/authenticate.js +18 -0
- package/lib/commands/create/component.js +55 -72
- package/lib/commands/create/course.js +25 -80
- package/lib/commands/create/question.js +18 -0
- package/lib/commands/create.js +80 -85
- package/lib/commands/devinstall.js +35 -97
- package/lib/commands/help.js +31 -52
- package/lib/commands/install.js +16 -863
- package/lib/commands/ls.js +9 -24
- package/lib/commands/register.js +10 -195
- package/lib/commands/rename.js +13 -128
- package/lib/commands/search.js +10 -28
- package/lib/commands/uninstall.js +9 -136
- package/lib/commands/unregister.js +11 -95
- package/lib/commands/update.js +12 -867
- package/lib/commands/version.js +12 -14
- package/lib/integration/AdaptFramework/build.js +42 -0
- package/lib/integration/AdaptFramework/clone.js +27 -0
- package/lib/integration/AdaptFramework/deleteSrcCore.js +9 -0
- package/lib/integration/AdaptFramework/deleteSrcCourse.js +9 -0
- package/lib/integration/AdaptFramework/download.js +21 -0
- package/lib/integration/AdaptFramework/erase.js +34 -0
- package/lib/integration/AdaptFramework/getLatestVersion.js +79 -0
- package/lib/integration/AdaptFramework/npmInstall.js +21 -0
- package/lib/integration/AdaptFramework.js +19 -0
- package/lib/integration/Plugin.js +404 -0
- package/lib/integration/PluginManagement/autenticate.js +56 -0
- package/lib/integration/PluginManagement/install.js +224 -0
- package/lib/integration/PluginManagement/print.js +52 -0
- package/lib/integration/PluginManagement/register.js +130 -0
- package/lib/integration/PluginManagement/rename.js +101 -0
- package/lib/integration/PluginManagement/schemas.js +8 -0
- package/lib/integration/PluginManagement/search.js +46 -0
- package/lib/integration/PluginManagement/uninstall.js +141 -0
- package/lib/integration/PluginManagement/unregister.js +101 -0
- package/lib/integration/PluginManagement/update.js +224 -0
- package/lib/integration/PluginManagement.js +21 -0
- package/lib/integration/Project.js +146 -0
- package/lib/integration/Target.js +299 -0
- package/lib/integration/getBowerRegistryConfig.js +34 -0
- package/lib/logger.js +28 -0
- package/lib/util/JSONReadValidate.js +34 -0
- package/lib/util/constants.js +38 -0
- package/lib/util/createPromptTask.js +7 -0
- package/lib/util/download.js +45 -0
- package/lib/util/errors.js +58 -0
- package/lib/util/extract.js +24 -0
- package/lib/util/getDirNameFromImportMeta.js +6 -0
- package/lib/util/promises.js +36 -0
- package/package.json +20 -29
- package/TESTING.md +0 -25
- package/bin/adapt +0 -3
- package/gruntfile.js +0 -18
- package/lib/AdaptConsoleApplication.js +0 -19
- package/lib/CommandParser.js +0 -19
- package/lib/CommandTranslator.js +0 -16
- package/lib/ConsoleRenderer.js +0 -10
- package/lib/Constants.js +0 -69
- package/lib/JsonLoader.js +0 -40
- package/lib/JsonWriter.js +0 -21
- package/lib/PackageMeta.js +0 -41
- package/lib/Plugin.js +0 -53
- package/lib/PluginTypeResolver.js +0 -47
- package/lib/Project.js +0 -89
- package/lib/RendererHelpers.js +0 -41
- package/lib/RepositoryDownloader.js +0 -64
- package/lib/Slug.js +0 -5
- package/lib/VersionChecker.js +0 -7
- package/lib/commands/create/index.js +0 -6
- package/lib/commands/index.js +0 -16
- package/lib/commands/install/InstallLog.js +0 -32
- package/lib/commands/install/InstallTarget.js +0 -259
- package/lib/commands/install/extend.js +0 -31
- package/lib/download.js +0 -101
- package/lib/errors.js +0 -58
- package/lib/promise/authenticate.js +0 -58
- package/lib/promise/build.js +0 -20
- package/lib/promise/cloneInstall.js +0 -35
- package/lib/promise/confirmBuild.js +0 -6
- package/lib/promise/exec.js +0 -39
- package/lib/promise/getRepository.js +0 -26
- package/lib/promise/highest.js +0 -109
- package/lib/promise/install.js +0 -31
- package/lib/promise/installAdaptDependencies.js +0 -30
- package/lib/promise/installNodeDependencies.js +0 -28
- package/lib/promise/removeTemporaryDownload.js +0 -8
- package/lib/promise/replaceTextContent.js +0 -10
- package/lib/promise/uninstallPackage.js +0 -15
- package/lib/promise/update.js +0 -33
- package/lib/promise/util.js +0 -16
- package/test/fixtures/adapt-with-plugins.json +0 -6
- package/test/specs/command_translation_concerns.js +0 -13
- package/test/specs/create_command_concerns.js +0 -22
- package/test/specs/create_concerns.js +0 -30
- package/test/specs/install_concerns.js +0 -31
- package/test/specs/installing_compatible_plugins_concerns.js +0 -126
- package/test/specs/installing_incompatible_plugins_concerns.js +0 -103
- package/test/specs/ls_concerns.js +0 -28
- package/test/specs/plugin_name_concerns.js +0 -82
- package/test/specs/project_concerns.js +0 -128
- package/test/specs/registration_concerns.js +0 -31
- package/test/specs/repository_downloader_concerns.js +0 -55
- package/test/specs/search_concerns.js +0 -30
- package/test/specs/type_resolution_concerns.js +0 -71
- package/test/specs/uninstall_command_concerns.js +0 -64
- package/test/specs/uninstall_concerns.js +0 -31
package/.eslintignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
node_modules
|
package/.eslintrc.json
ADDED
package/README.md
CHANGED
@@ -1,266 +1,266 @@
|
|
1
1
|
Adapt Command Line Interface (CLI)
|
2
2
|
============================
|
3
3
|
|
4
|
-
[](https://travis-ci.org/adaptlearning/adapt-cli) [](https://gitter.im/adaptlearning/adapt-cli?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
4
|
+
[](https://travis-ci.org/adaptlearning/adapt-cli) [](https://gitter.im/adaptlearning/adapt-cli?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
5
5
|
|
6
|
-
The **Adapt CLI** is a command line interface for use with the [Adapt framework](https://github.com/adaptlearning/adapt_framework). Its primary usefulness is to install, update, and uninstall Adapt plug-ins. In doing so, it references the [Adapt Plugin Browser](https://www.adaptlearning.org/index.php/plugin-browser/). Consequently, the CLI includes several commands for working with this plug-in registry.
|
6
|
+
The **Adapt CLI** is a command line interface for use with the [Adapt framework](https://github.com/adaptlearning/adapt_framework). Its primary usefulness is to install, update, and uninstall Adapt plug-ins. In doing so, it references the [Adapt Plugin Browser](https://www.adaptlearning.org/index.php/plugin-browser/). Consequently, the CLI includes several commands for working with this plug-in registry.
|
7
7
|
|
8
8
|
>IMPORTANT: The **Adapt CLI** is not intended to be used with courses in the [Adapt authoring tool](https://github.com/adaptlearning/adapt_authoring). The authoring tool tracks versions of plug-ins in its database. Using the CLI bypasses this tracking.
|
9
9
|
|
10
10
|
## Installation
|
11
11
|
|
12
|
-
Before installing the Adapt CLI, you must install [NodeJS](http://nodejs.org) and [git](http://git-scm.com/downloads).
|
13
|
-
To install the Adapt CLI globally, run the following command:
|
12
|
+
Before installing the Adapt CLI, you must install [NodeJS](http://nodejs.org) and [git](http://git-scm.com/downloads).
|
13
|
+
To install the Adapt CLI globally, run the following command:
|
14
14
|
|
15
15
|
`npm install -g adapt-cli`
|
16
16
|
|
17
17
|
Some systems may require elevated permissions in order to install a script globally.
|
18
18
|
|
19
19
|
|
20
|
-
## Commands
|
20
|
+
## Commands
|
21
21
|
|
22
|
-
### adapt version
|
22
|
+
### adapt version
|
23
23
|
|
24
|
-
##### Model:
|
25
|
-
`adapt version`
|
24
|
+
##### Model:
|
25
|
+
`adapt version`
|
26
26
|
|
27
|
-
This command reports both the version of the CLI and the version of the Adapt framework. The version of the framework is reported as "0.0.0" unless the command is run from the root directory of an installed framework.
|
28
|
-
<div float align=right><a href="#top">Back to Top</a></div>
|
27
|
+
This command reports both the version of the CLI and the version of the Adapt framework. The version of the framework is reported as "0.0.0" unless the command is run from the root directory of an installed framework.
|
28
|
+
<div float align=right><a href="#top">Back to Top</a></div>
|
29
|
+
|
30
|
+
### adapt help
|
29
31
|
|
30
|
-
|
32
|
+
##### Model:
|
33
|
+
`adapt help [<command>]`
|
31
34
|
|
32
|
-
|
33
|
-
`adapt help [<command>]`
|
35
|
+
**command**: A CLI command.
|
34
36
|
|
35
|
-
|
37
|
+
##### Examples:
|
36
38
|
|
37
|
-
|
39
|
+
1. To list all the CLI commands with a brief description of each:
|
40
|
+
`adapt help`
|
38
41
|
|
39
|
-
1. To
|
40
|
-
`adapt help`
|
42
|
+
1. To report a brief description of a specific command:
|
43
|
+
`adapt help create`
|
41
44
|
|
42
|
-
1. To report a brief description of a specific command:
|
43
|
-
`adapt help create`
|
44
|
-
|
45
45
|
<div float align=right><a href="#top">Back to Top</a></div>
|
46
46
|
|
47
|
-
### adapt create
|
47
|
+
### adapt create
|
48
48
|
|
49
|
-
##### Model:
|
49
|
+
##### Model:
|
50
50
|
`adapt create [<type> <path> <branch|tag>]`
|
51
51
|
|
52
|
-
**type**: What to create. Acceptable values are `course` and `component`.
|
53
|
-
**path**: The directory of the new course. Enclose in quotes if the path/name includes spaces.
|
54
|
-
**branch|tag**: The branch or tag name of the framework to be downloaded. This is optional. If not specified, the master branch will be used.
|
52
|
+
**type**: What to create. Acceptable values are `course` and `component`.
|
53
|
+
**path**: The directory of the new course. Enclose in quotes if the path/name includes spaces.
|
54
|
+
**branch|tag**: The branch or tag name of the framework to be downloaded. This is optional. If not specified, the master branch will be used.
|
55
55
|
|
56
|
-
##### Examples:
|
56
|
+
##### Examples:
|
57
57
|
|
58
|
-
1. To create an Adapt course *(do not use in conjunction with the Adapt authoring tool)*:
|
59
|
-
`adapt create course "My Course"`
|
60
|
-
This will create a new directory named "My Course" in your current working directory. It will download the Adapt framework from its master branch, including the default course, into the new directory. Before using the course, run:
|
61
|
-
`grunt build`
|
58
|
+
1. To create an Adapt course *(do not use in conjunction with the Adapt authoring tool)*:
|
59
|
+
`adapt create course "My Course"`
|
60
|
+
This will create a new directory named "My Course" in your current working directory. It will download the Adapt framework from its master branch, including the default course, into the new directory. Before using the course, run:
|
61
|
+
`grunt build`
|
62
62
|
|
63
|
-
1. To create an Adapt course from a specific branch:
|
64
|
-
`adapt create course "My Course" legacy`
|
63
|
+
1. To create an Adapt course from a specific branch:
|
64
|
+
`adapt create course "My Course" legacy`
|
65
65
|
This is the same as example 1 except that the framework will be downloaded from the 'legacy' branch, not from the default master branch.
|
66
66
|
|
67
|
-
1. To create an Adapt course from a specific tag:
|
67
|
+
1. To create an Adapt course from a specific tag:
|
68
68
|
`adapt create course "My Course" v3.5.1`
|
69
69
|
This is the same as example 1 except that v3.5.1 of the framework will be downloaded, rather than the master branch.
|
70
70
|
|
71
|
-
1. To create an empty component:
|
72
|
-
`adapt create component "test-component"`
|
73
|
-
This command is useful for developing new components. It will create a new directory named "test-component" in the current working directory. It will populate the directory with files required for an Adapt component and insert "test-component" into the code where required.
|
71
|
+
1. To create an empty component:
|
72
|
+
`adapt create component "test-component"`
|
73
|
+
This command is useful for developing new components. It will create a new directory named "test-component" in the current working directory. It will populate the directory with files required for an Adapt component and insert "test-component" into the code where required.
|
74
74
|
<div float align=right><a href="#top">Back to Top</a></div>
|
75
75
|
|
76
|
-
### adapt search
|
76
|
+
### adapt search
|
77
77
|
|
78
|
-
##### Model:
|
79
|
-
`adapt search [<plug-in>]`
|
78
|
+
##### Model:
|
79
|
+
`adapt search [<plug-in>]`
|
80
80
|
|
81
|
-
**plug-in**: The optional name of the plug-in that you want to search for. Any part of the name may be used; multiple results may be returned if the partial name is not unique.
|
81
|
+
**plug-in**: The optional name of the plug-in that you want to search for. Any part of the name may be used; multiple results may be returned if the partial name is not unique.
|
82
82
|
|
83
83
|
The **search** command searches within [Adapt Plugin Browser](https://www.adaptlearning.org/index.php/plugin-browser/). It will return the plug-in's complete name and its source repository only if the plug-in is registered.
|
84
84
|
|
85
|
-
##### Examples:
|
86
|
-
1. To view the name and repository of all plug-ins registered with the Adapt Plugin Browser:
|
87
|
-
`adapt search`
|
85
|
+
##### Examples:
|
86
|
+
1. To view the name and repository of all plug-ins registered with the Adapt Plugin Browser:
|
87
|
+
`adapt search`
|
88
88
|
|
89
|
-
1. To locate the repository of a known plug-in that is registered:
|
90
|
-
`adapt search adapt-contrib-pageLevelProgress` OR
|
91
|
-
`adapt search contrib-pageLevelProgress` OR
|
92
|
-
`adapt search pageLevel`
|
89
|
+
1. To locate the repository of a known plug-in that is registered:
|
90
|
+
`adapt search adapt-contrib-pageLevelProgress` OR
|
91
|
+
`adapt search contrib-pageLevelProgress` OR
|
92
|
+
`adapt search pageLevel`
|
93
93
|
<div float align=right><a href="#top">Back to Top</a></div>
|
94
94
|
|
95
|
-
### adapt install
|
95
|
+
### adapt install
|
96
96
|
|
97
|
-
##### Models:
|
98
|
-
`adapt install <plug-in>[#|@<version>]`
|
99
|
-
`adapt install [--dry-run|--compatible]`
|
97
|
+
##### Models:
|
98
|
+
`adapt install <plug-in>[#|@<version>]`
|
99
|
+
`adapt install [--dry-run|--compatible]`
|
100
100
|
|
101
|
-
**plug-in**: The name of the plug-in to be installed. The name may be fully qualified with "adapt-" or the prefix may be omitted. Parts of names are not acceptable.
|
102
|
-
**version**: A specific version number of the plug-in. This is optional.
|
101
|
+
**plug-in**: The name of the plug-in to be installed. The name may be fully qualified with "adapt-" or the prefix may be omitted. Parts of names are not acceptable.
|
102
|
+
**version**: A specific version number of the plug-in. This is optional.
|
103
103
|
|
104
|
-
##### Examples:
|
105
|
-
1. To install all plug-ins listed in *adapt.json*:
|
104
|
+
##### Examples:
|
105
|
+
1. To install all plug-ins listed in *adapt.json*:
|
106
106
|
`adapt install`
|
107
|
-
This command must be run in the root directory of an Adapt framework installation.
|
107
|
+
This command must be run in the root directory of an Adapt framework installation.
|
108
108
|
|
109
|
-
1. To report the plug-ins that will be installed if `adapt install` is run:
|
109
|
+
1. To report the plug-ins that will be installed if `adapt install` is run:
|
110
110
|
`adapt install --dry-run`
|
111
|
-
This command must be run in the root directory of an Adapt framework installation.
|
111
|
+
This command must be run in the root directory of an Adapt framework installation.
|
112
112
|
|
113
|
-
1. To install versions of all plug-ins listed in *adapt.json* that are compatible with the installed framework version. This overrides any incompatible settings provided on the command line or in *adapt.json*.
|
113
|
+
1. To install versions of all plug-ins listed in *adapt.json* that are compatible with the installed framework version. This overrides any incompatible settings provided on the command line or in *adapt.json*.
|
114
114
|
`adapt install --compatible`
|
115
115
|
This command must be run in the root directory of an Adapt framework installation.
|
116
116
|
|
117
|
-
1. To install a plug-in that has been registered with the [Adapt Plug-in Browser](https://www.adaptlearning.org/index.php/plugin-browser/) registry:
|
118
|
-
`adapt install adapt-contrib-pageLevelProgress` OR
|
119
|
-
`adapt install contrib-pageLevelProgress`
|
120
|
-
|
121
|
-
1. To install a specific version of a registered plug-in:
|
122
|
-
`adapt install adapt-contrib-pageLevelProgress#1.1.0` OR
|
123
|
-
`adapt install adapt-contrib-pageLevelProgress@1.1.0` OR
|
124
|
-
`adapt install contrib-pageLevelProgress#1.1.0` OR
|
125
|
-
`adapt install contrib-pageLevelProgress@1.1.0`
|
126
|
-
|
127
|
-
1. To use the CLI to install a plug-in that is not registered with [Adapt Plug-in Browser](https://www.adaptlearning.org/index.php/plugin-browser/) registry:
|
128
|
-
1. Copy the uncompressed folder to the proper location for the type of plug-in. Components: *src/components*. Extensions: *src/extensions*. Menu: *src/menu*. Theme: *src/theme*. Note: The Adapt framework allows only one theme. Uninstall the current before replacing it with an alternative. More than one menu is allowed.
|
129
|
-
1. Open *adapt.json* in an editor and add the full name of the new component to the list.
|
130
|
-
1. Run the following command from the course root:
|
131
|
-
`adapt install`
|
117
|
+
1. To install a plug-in that has been registered with the [Adapt Plug-in Browser](https://www.adaptlearning.org/index.php/plugin-browser/) registry:
|
118
|
+
`adapt install adapt-contrib-pageLevelProgress` OR
|
119
|
+
`adapt install contrib-pageLevelProgress`
|
120
|
+
|
121
|
+
1. To install a specific version of a registered plug-in:
|
122
|
+
`adapt install adapt-contrib-pageLevelProgress#1.1.0` OR
|
123
|
+
`adapt install adapt-contrib-pageLevelProgress@1.1.0` OR
|
124
|
+
`adapt install contrib-pageLevelProgress#1.1.0` OR
|
125
|
+
`adapt install contrib-pageLevelProgress@1.1.0`
|
126
|
+
|
127
|
+
1. To use the CLI to install a plug-in that is not registered with [Adapt Plug-in Browser](https://www.adaptlearning.org/index.php/plugin-browser/) registry:
|
128
|
+
1. Copy the uncompressed folder to the proper location for the type of plug-in. Components: *src/components*. Extensions: *src/extensions*. Menu: *src/menu*. Theme: *src/theme*. Note: The Adapt framework allows only one theme. Uninstall the current before replacing it with an alternative. More than one menu is allowed.
|
129
|
+
1. Open *adapt.json* in an editor and add the full name of the new component to the list.
|
130
|
+
1. Run the following command from the course root:
|
131
|
+
`adapt install`
|
132
132
|
After installation, most CLI commands will operate on the plug-in with the exception of `adapt update`. Plug-ins must be registered with the [Adapt Plugin Browser](https://www.adaptlearning.org/index.php/plugin-browser/) for `adapt update` to succeed.
|
133
133
|
|
134
|
-
1. To update all registered plug-ins to their most recent public release:
|
135
|
-
`adapt update`
|
136
|
-
Since no plug-in name is specified in this command, all plug-ins listed in *adapt.json* are reinstalled. Whether the plug-in is updated will be determined by the compatible framework versions specified in *adapt.json*. If it includes a plug-in that is not registered, it will not be updated.
|
137
|
-
**Note to developers:** The CLI determines newest version by comparing release tags in the GitHub repo. Be sure to use a tag when you release a new version.
|
138
|
-
<div float align=right><a href="#top">Back to Top</a></div>
|
134
|
+
1. To update all registered plug-ins to their most recent public release:
|
135
|
+
`adapt update`
|
136
|
+
Since no plug-in name is specified in this command, all plug-ins listed in *adapt.json* are reinstalled. Whether the plug-in is updated will be determined by the compatible framework versions specified in *adapt.json*. If it includes a plug-in that is not registered, it will not be updated.
|
137
|
+
**Note to developers:** The CLI determines newest version by comparing release tags in the GitHub repo. Be sure to use a tag when you release a new version.
|
138
|
+
<div float align=right><a href="#top">Back to Top</a></div>
|
139
139
|
|
140
|
-
### adapt ls
|
140
|
+
### adapt ls
|
141
141
|
|
142
|
-
##### Model:
|
143
|
-
`adapt ls`
|
142
|
+
##### Model:
|
143
|
+
`adapt ls`
|
144
144
|
|
145
|
-
This command lists the name and version number of all plug-ins listed in the *adapt.json* file of the current directory.
|
146
|
-
<div float align=right><a href="#top">Back to Top</a></div>
|
145
|
+
This command lists the name and version number of all plug-ins listed in the *adapt.json* file of the current directory.
|
146
|
+
<div float align=right><a href="#top">Back to Top</a></div>
|
147
147
|
|
148
|
-
### adapt uninstall
|
148
|
+
### adapt uninstall
|
149
149
|
|
150
|
-
##### Model:
|
151
|
-
`adapt uninstall <plug-in>`
|
150
|
+
##### Model:
|
151
|
+
`adapt uninstall <plug-in>`
|
152
152
|
|
153
|
-
**plug-in**: The name of the plug-in to be installed. The name may be fully qualified with "adapt-" or the prefix may be omitted. Parts of names are not acceptable.
|
153
|
+
**plug-in**: The name of the plug-in to be installed. The name may be fully qualified with "adapt-" or the prefix may be omitted. Parts of names are not acceptable.
|
154
154
|
|
155
|
-
##### Examples:
|
156
|
-
1. To uninstall a plug-in:
|
157
|
-
`adapt uninstall adapt-contrib-pageLevelProgress` OR
|
158
|
-
`adapt uninstall contrib-pageLevelProgress`
|
159
|
-
Because the plug-in registry is not referenced during the uninstall process, this command will work whether or not the plug-in is registered with the Adapt Plugin Browser..
|
155
|
+
##### Examples:
|
156
|
+
1. To uninstall a plug-in:
|
157
|
+
`adapt uninstall adapt-contrib-pageLevelProgress` OR
|
158
|
+
`adapt uninstall contrib-pageLevelProgress`
|
159
|
+
Because the plug-in registry is not referenced during the uninstall process, this command will work whether or not the plug-in is registered with the Adapt Plugin Browser..
|
160
160
|
<div float align=right><a href="#top">Back to Top</a></div>
|
161
161
|
|
162
162
|
### adapt devinstall
|
163
163
|
|
164
|
-
##### Model:
|
165
|
-
`adapt devinstall [<plug-in>[#<version>]]`
|
164
|
+
##### Model:
|
165
|
+
`adapt devinstall [<plug-in>[#<version>]]`
|
166
166
|
|
167
|
-
**plug-in**: Name of the plug-in to be cloned.
|
168
|
-
**version**: Version of the plug-in to be installed.
|
167
|
+
**plug-in**: Name of the plug-in to be cloned.
|
168
|
+
**version**: Version of the plug-in to be installed.
|
169
169
|
|
170
|
-
##### Examples:
|
170
|
+
##### Examples:
|
171
171
|
|
172
|
-
1. To clone as git repositories the Adapt framework and all the plug-ins listed in *adapt.json* of the current directory:
|
173
|
-
`adapt devinstall`
|
172
|
+
1. To clone as git repositories the Adapt framework and all the plug-ins listed in *adapt.json* of the current directory:
|
173
|
+
`adapt devinstall`
|
174
174
|
|
175
|
-
1. To clone a specific plug-in listed in the *adapt.json*:
|
176
|
-
`adapt devinstall adapt-contrib-matching`
|
175
|
+
1. To clone a specific plug-in listed in the *adapt.json*:
|
176
|
+
`adapt devinstall adapt-contrib-matching`
|
177
177
|
|
178
|
-
1. To clone a specific version of a plug-in listed in the *adapt.json*:
|
179
|
-
`adapt devinstall adapt-contrib-matching#v2.2.0`
|
178
|
+
1. To clone a specific version of a plug-in listed in the *adapt.json*:
|
179
|
+
`adapt devinstall adapt-contrib-matching#v2.2.0`
|
180
180
|
<div float align=right><a href="#top">Back to Top</a></div>
|
181
181
|
|
182
182
|
### adapt update
|
183
183
|
|
184
|
-
##### Models:
|
185
|
-
`adapt update [<plug-in>[#|@<version>]][--check]`
|
184
|
+
##### Models:
|
185
|
+
`adapt update [<plug-in>[#|@<version>]][--check]`
|
186
186
|
`adapt update [components|extensions|menu|theme|all][--check]`
|
187
187
|
|
188
|
-
**plug-in**: Name of the plug-in to be cloned.
|
189
|
-
**version**: Version of the plug-in to be installed.
|
188
|
+
**plug-in**: Name of the plug-in to be cloned.
|
189
|
+
**version**: Version of the plug-in to be installed.
|
190
190
|
Before running the update command, ensure that there is no *bower.json* file in your project directory.
|
191
191
|
|
192
|
-
##### Examples:
|
192
|
+
##### Examples:
|
193
193
|
|
194
|
-
1. To report the latest compatible version for each plug-in in the current directory (plug-ins are not updated):
|
195
|
-
`adapt update --check`
|
196
|
-
Note: The `--check` option may be used to report on a specific plug-in or on a complete plug-in group (components, extensions, theme, menu):
|
197
|
-
`adapt update adapt-contrib-matching --check`
|
198
|
-
`adapt update extensions --check`
|
194
|
+
1. To report the latest compatible version for each plug-in in the current directory (plug-ins are not updated):
|
195
|
+
`adapt update --check`
|
196
|
+
Note: The `--check` option may be used to report on a specific plug-in or on a complete plug-in group (components, extensions, theme, menu):
|
197
|
+
`adapt update adapt-contrib-matching --check`
|
198
|
+
`adapt update extensions --check`
|
199
199
|
|
200
|
-
1. To update a registered plug-in:
|
201
|
-
`adapt update adapt-contrib-pageLevelProgress` OR
|
202
|
-
`adapt update contrib-pageLevelProgress`
|
200
|
+
1. To update a registered plug-in:
|
201
|
+
`adapt update adapt-contrib-pageLevelProgress` OR
|
202
|
+
`adapt update contrib-pageLevelProgress`
|
203
203
|
|
204
|
-
1. To update a specific version of a registered plug-in:
|
205
|
-
`adapt update adapt-contrib-pageLevelProgress#1.1.0` OR
|
206
|
-
`adapt update adapt-contrib-pageLevelProgress@1.1.0` OR
|
207
|
-
`adapt update contrib-pageLevelProgress#1.1.0` OR
|
208
|
-
`adapt update contrib-pageLevelProgress@1.1.0`
|
204
|
+
1. To update a specific version of a registered plug-in:
|
205
|
+
`adapt update adapt-contrib-pageLevelProgress#1.1.0` OR
|
206
|
+
`adapt update adapt-contrib-pageLevelProgress@1.1.0` OR
|
207
|
+
`adapt update contrib-pageLevelProgress#1.1.0` OR
|
208
|
+
`adapt update contrib-pageLevelProgress@1.1.0`
|
209
209
|
<div float align=right><a href="#top">Back to Top</a></div>
|
210
210
|
|
211
|
-
### adapt register
|
211
|
+
### adapt register
|
212
212
|
|
213
|
-
##### Command:
|
214
|
-
`adapt register`
|
213
|
+
##### Command:
|
214
|
+
`adapt register`
|
215
215
|
|
216
|
-
This command must be run from within the root directory of the plug-in you want to register. "name" and "repository" will be read from *bower.json* in the current directory. The plug-in name must be prefixed with "adapt-" and each word separated with a hyphen (-). Plug-in names are checked against those already registered to avoid duplicates.
|
216
|
+
This command must be run from within the root directory of the plug-in you want to register. "name" and "repository" will be read from *bower.json* in the current directory. The plug-in name must be prefixed with "adapt-" and each word separated with a hyphen (-). Plug-in names are checked against those already registered to avoid duplicates.
|
217
217
|
<div float align=right><a href="#top">Back to Top</a></div>
|
218
218
|
|
219
|
-
URL format must be of the form `
|
219
|
+
URL format must be of the form `https://github.com/<user>/<repo_name>.git`
|
220
220
|
|
221
|
-
### adapt rename
|
221
|
+
### adapt rename
|
222
222
|
|
223
|
-
##### Command:
|
224
|
-
`adapt rename <current-name> <new-name>`
|
223
|
+
##### Command:
|
224
|
+
`adapt rename <current-name> <new-name>`
|
225
225
|
|
226
|
-
**current-name**: Name of the plug-in currently used in the plug-in registry.
|
226
|
+
**current-name**: Name of the plug-in currently used in the plug-in registry.
|
227
227
|
**new-name**: Name proposed to replace the current plug-in name.
|
228
228
|
|
229
|
-
Please note that you must authenticate with GitHub to use **rename**. You must be a collaborator on the endpoint registered with the plug-in or a collaborator on the Adapt framework. Access to GitHub is for authentication only.
|
229
|
+
Please note that you must authenticate with GitHub to use **rename**. You must be a collaborator on the endpoint registered with the plug-in or a collaborator on the Adapt framework. Access to GitHub is for authentication only.
|
230
230
|
|
231
|
-
##### Example:
|
231
|
+
##### Example:
|
232
232
|
|
233
|
-
1. To rename a plug-in:
|
234
|
-
`adapt rename adapt-incorrectName adapt-betterName`
|
233
|
+
1. To rename a plug-in:
|
234
|
+
`adapt rename adapt-incorrectName adapt-betterName`
|
235
235
|
<div float align=right><a href="#top">Back to Top</a></div>
|
236
236
|
|
237
|
-
### adapt unregister
|
237
|
+
### adapt unregister
|
238
238
|
|
239
|
-
##### Command:
|
240
|
-
`adapt unregister [<plug-in>]`
|
239
|
+
##### Command:
|
240
|
+
`adapt unregister [<plug-in>]`
|
241
241
|
|
242
|
-
**plug-in**: Name of the plug-in currently used in the plug-in registry.
|
242
|
+
**plug-in**: Name of the plug-in currently used in the plug-in registry.
|
243
243
|
|
244
|
-
Please note that you must authenticate with GitHub to use **unregister**. You must be a collaborator on the endpoint registered with the plug-in or a collaborator on the Adapt framework. Access to GitHub is for authentication only.
|
244
|
+
Please note that you must authenticate with GitHub to use **unregister**. You must be a collaborator on the endpoint registered with the plug-in or a collaborator on the Adapt framework. Access to GitHub is for authentication only.
|
245
245
|
|
246
|
-
##### Examples:
|
246
|
+
##### Examples:
|
247
247
|
|
248
|
-
1. To unregister a plug-in while in the root directory of the plug-in:
|
249
|
-
`adapt unregister`
|
248
|
+
1. To unregister a plug-in while in the root directory of the plug-in:
|
249
|
+
`adapt unregister`
|
250
250
|
|
251
|
-
1. To unregister a plug-in by name:
|
252
|
-
`adapt unregister adapt-myMistake`
|
251
|
+
1. To unregister a plug-in by name:
|
252
|
+
`adapt unregister adapt-myMistake`
|
253
253
|
<div float align=right><a href="#top">Back to Top</a></div>
|
254
254
|
|
255
255
|
|
256
256
|
The Plug-in Registry
|
257
257
|
-------------------
|
258
258
|
|
259
|
-
The Adapt community maintains the [Adapt Plugin Browser](https://www.adaptlearning.org/index.php/plugin-browser/) as a convenient registry of components, extensions, themes, and menus. The plug-in system is powered by [Bower](http://bower.io/): http://adapt-bower-repository.herokuapp.com/packages/. To register, a plug-in must be a valid bower package with *bower.json*, and have a unique name that is prefixed with "adapt-".
|
259
|
+
The Adapt community maintains the [Adapt Plugin Browser](https://www.adaptlearning.org/index.php/plugin-browser/) as a convenient registry of components, extensions, themes, and menus. The plug-in system is powered by [Bower](http://bower.io/): http://adapt-bower-repository.herokuapp.com/packages/. To register, a plug-in must be a valid bower package with *bower.json*, and have a unique name that is prefixed with "adapt-".
|
260
260
|
|
261
|
-
See [Developing plug-ins](https://github.com/adaptlearning/adapt_framework/wiki/Developing-plugins) for more information on defining your plug-in's package and on [registering your plug-in](https://github.com/adaptlearning/adapt_framework/wiki/Registering-a-plugin).
|
262
|
-
<div float align=right><a href="#top">Back to Top</a></div>
|
261
|
+
See [Developing plug-ins](https://github.com/adaptlearning/adapt_framework/wiki/Developing-plugins) for more information on defining your plug-in's package and on [registering your plug-in](https://github.com/adaptlearning/adapt_framework/wiki/Registering-a-plugin).
|
262
|
+
<div float align=right><a href="#top">Back to Top</a></div>
|
263
263
|
|
264
264
|
----------------------------
|
265
|
-
**Version number:**
|
266
|
-
**Author / maintainer:** Adapt Core Team with [contributors](https://github.com/adaptlearning/adapt-contrib-hotgraphic/graphs/contributors)
|
265
|
+
**Version number:** 3.0.2 <a href="https://community.adaptlearning.org/" target="_blank"><img src="https://github.com/adaptlearning/documentation/blob/master/04_wiki_assets/plug-ins/images/adapt-logo-mrgn-lft.jpg" alt="adapt learning logo" align="right"></a>
|
266
|
+
**Author / maintainer:** Adapt Core Team with [contributors](https://github.com/adaptlearning/adapt-contrib-hotgraphic/graphs/contributors)
|
package/bin/adapt.js
ADDED
package/json/help-create.json
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
],
|
7
7
|
"commands": {
|
8
8
|
"course": "Create new adapt course",
|
9
|
-
"component": "Create new
|
9
|
+
"component": "Create new component using template adapt-component",
|
10
|
+
"question": "Create new question component using template adapt-questionComponent"
|
10
11
|
}
|
11
12
|
}
|