@m2c2kit/cli 0.3.8 → 0.3.9
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 +14 -64
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,72 +1,22 @@
|
|
|
1
1
|
# @m2c2kit/cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
|
+
[](https://github.com/m2c2-project/m2c2kit/actions/workflows/ci.yml)
|
|
5
|
+
[](https://www.npmjs.com/package/@m2c2kit/cli)
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
This package contains the command line interface (CLI) for developing m2c2kit apps.
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
- [Visual Studio Code](https://code.visualstudio.com/download). Recommended.
|
|
9
|
-
- [Google Chrome](https://www.google.com/chrome). Recommended.
|
|
10
|
-
- [Git](https://git-scm.com/downloads). Recommended.
|
|
9
|
+
**m2c2kit** is a library for cross-platform cognitive assessments. Features:
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
- **Mobile first**. Optimized for touch and mobile devices while also usable on desktops.
|
|
12
|
+
- **Portable**. Use on browsers, compile within native apps using web views, or embed in products like Qualtrics. A shared assessment codebase reduces development time and promotes experiment standardization across devices and services.
|
|
13
|
+
- **Rapid iteration**. Quickly develop and test new assessments with the JavaScript-based library and deploy them in studies.
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
## Resources
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
npm install -g @m2c2kit/cli
|
|
18
|
-
m2 new myapp
|
|
19
|
-
cd myapp
|
|
20
|
-
npm run serve
|
|
21
|
-
```
|
|
17
|
+
---
|
|
22
18
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
Note: if you execute `npm run build`, it will create a production build in `dist` that is suitable for deploying to a web server. In a production build, all build artifacts (except for `index.html`) will have hashes added to their filenames to promote cache busting upon repeated deployments.
|
|
28
|
-
|
|
29
|
-
## Visual Studio Code
|
|
30
|
-
|
|
31
|
-
When creating a project with `m2 new`, the CLI will configure the project for debugging with Visual Studio Code and Chrome. When the app is served locally (`npm run serve`), debugging in Visual Studio Code is available by pressing `F5` or selecting Run, Start Debugging.
|
|
32
|
-
|
|
33
|
-
<img src=".github/images/m2c2kit-vscode-debugging.gif" />
|
|
34
|
-
|
|
35
|
-
## Adding more cognitive assessments
|
|
36
|
-
|
|
37
|
-
m2c2kit has a rich API for writing your own cognitive assessments. In addition, the m2c2kit team has developed cognitive assessments in ready-to-use form, which are available as separate packages (`@m2c2kit/assessment-symbol-search`, `@m2c2kit/assessment-color-dots`, `@m2c2kit/assessment-grid-memory`, `@m2c2kit/assessment-color-shapes`). Once you have scaffolded the demo app, to add additional assessments:
|
|
38
|
-
|
|
39
|
-
1. Install the package for the assessment. For example, if you scaffolded your app above with `m2 new myapp`, and now you want to add the m2c2kit Symbol Search assessment, execute the following from the `myapp` directory: `npm install @m2c2kit/assessment-symbol-search`.
|
|
40
|
-
2. Update your app's source code to import the Symbol Search assessment. In the file `src/index.ts`, add to the top: `import { SymbolSearch } from '@m2c2kit/assessment-symbol-search';`
|
|
41
|
-
3. Update your app's source code to create and use an instance of Symbol Search. In the file `src/index.ts`, find these lines:
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
const activity = new Myapp();
|
|
45
|
-
const session = new Session({
|
|
46
|
-
activities: [activity],
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
and change to
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
const activity = new Myapp();
|
|
53
|
-
const ss = new SymbolSearch();
|
|
54
|
-
const session = new Session({
|
|
55
|
-
activities: [ss, activity],
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Now your app will run Symbol Search before it runs the demo assessment (Stroop).
|
|
59
|
-
|
|
60
|
-
## Configuring cognitive assessments
|
|
61
|
-
|
|
62
|
-
The assessments built by the m2c2kit team have reasonable default parameters, but assessments are also configurable. For example, the Symbol Search assessment has a default of 5 trials. To increase that to 10, find the code in `src/index.ts` that creates the `SymbolSearch` object and change it to:
|
|
63
|
-
|
|
64
|
-
```
|
|
65
|
-
const ss = new SymbolSearch({ "number_of_trials": 10 });
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
A full listing of the parameters for each assessments, and their default values, is available in repository for each assessment.
|
|
69
|
-
|
|
70
|
-
## License
|
|
71
|
-
|
|
72
|
-
MIT
|
|
19
|
+
- [Website](https://m2c2-project.github.io/m2c2kit/)
|
|
20
|
+
- [Live Examples](https://m2c2-project.github.io/m2c2kit/docs/category/examples)
|
|
21
|
+
- [Getting Started](https://m2c2-project.github.io/m2c2kit/docs/getting-started)
|
|
22
|
+
- [Interactive Tutorial](https://m2c2-project.github.io/m2c2kit/docs/tutorial-fundamentals/fundamentals)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m2c2kit/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"description": "m2c2kit command line interface",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/**"
|
|
@@ -16,17 +16,17 @@
|
|
|
16
16
|
"author": "",
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@angular-devkit/core": "^16.0
|
|
20
|
-
"@angular-devkit/schematics": "^16.0
|
|
19
|
+
"@angular-devkit/core": "^16.1.0",
|
|
20
|
+
"@angular-devkit/schematics": "^16.1.0",
|
|
21
21
|
"@m2c2kit/schematics": "^0.1.0",
|
|
22
|
-
"@schematics/angular": "^16.0
|
|
23
|
-
"@types/inquirer": "^8.2.4",
|
|
22
|
+
"@schematics/angular": "^16.1.0",
|
|
24
23
|
"ansi-colors": "4.1.3",
|
|
25
24
|
"inquirer": "8.2.4",
|
|
26
25
|
"symbol-observable": "4.0.0",
|
|
27
26
|
"yargs-parser": "21.1.1"
|
|
28
27
|
},
|
|
29
28
|
"devDependencies": {
|
|
29
|
+
"@types/inquirer": "8.2.6",
|
|
30
30
|
"rimraf": "5.0.1",
|
|
31
31
|
"typescript": "5.1.3"
|
|
32
32
|
}
|