@m2c2kit/cli 0.3.5 → 0.3.6

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/dist/.env CHANGED
@@ -1 +1 @@
1
- CLI_VERSION=0.3.5
1
+ CLI_VERSION=0.3.6
package/dist/cli.js CHANGED
@@ -73,7 +73,9 @@ await yarg
73
73
  describe: "name of new app",
74
74
  type: "string",
75
75
  });
76
- }, async (argv) => {
76
+ },
77
+ // WIP: app name should be lower case, not the class-case name
78
+ async (argv) => {
77
79
  const appName = argv["name"];
78
80
  if (isReservedWord(appName)) {
79
81
  console.error(`${chalk.red("ERROR")}: the name ${appName} is not valid. The name must be a valid JavaScript identifer (e.g., begin with a letter, $ or _; not contain spaces; not be a reserved word, etc.).`);
@@ -93,7 +93,7 @@ class {{className}} extends Game {
93
93
 
94
94
  const options: GameOptions = {
95
95
  name: "{{appName}}",
96
- id: "{{className}}",
96
+ id: "{{appName}}",
97
97
  version: "1.0.0",
98
98
  shortDescription:
99
99
  "A starter assessment created by the m2c2kit cli demonstrating the Stroop effect.",
@@ -125,24 +125,31 @@ articles in literature. Source: https://en.wikipedia.org/wiki/Stroop_effect`,
125
125
  trialSchema: trialSchema,
126
126
  parameters: defaultParameters,
127
127
  /**
128
- * IMPORTANT: fontUrls must be an array of string literals. If you
129
- * use anything else, the cache busting functionality will not work
130
- * when building for production. The following are examples of what
131
- * should NOT be used, even though they are syntactically correct:
128
+ * IMPORTANT: fonts is an array of FontAsset objects. The url for each
129
+ * fontAsset must be a string literal. If you use anything else, the
130
+ * cache busting functionality will not work when building for
131
+ * production.
132
+ * The following are examples of what should NOT be used, even though
133
+ * they are syntactically correct:
132
134
  *
133
- * fontUrls: ["assets/{{appName}}/" + "fonts/roboto/Roboto-Regular.ttf"]
135
+ * url: "fonts/" + "roboto/Roboto-Regular.ttf"
134
136
  *
135
- * const prefix = "assets/{{appName}}/";
137
+ * const prefix = "fonts/";
136
138
  * ...
137
- * fontUrls: [prefix + "fonts/roboto/Roboto-Regular.ttf"]
139
+ * url: prefix + "roboto/Roboto-Regular.ttf"
138
140
  */
139
141
  /**
140
142
  * The Roboto-Regular.ttf font is licensed under the Apache License,
141
143
  * and its LICENSE.TXT will be copied as part of the build.
142
144
  */
143
- fontUrls: ["assets/{{appName}}/fonts/roboto/Roboto-Regular.ttf"],
145
+ fonts: [
146
+ {
147
+ fontName: "roboto",
148
+ url: "fonts/roboto/Roboto-Regular.ttf",
149
+ },
150
+ ],
144
151
  /**
145
- * IMPORTANT: Similar to fontUrls, the url for an image must be
152
+ * IMPORTANT: Similar to FontAsset.url, the url for an image must be
146
153
  * a string literal.
147
154
  */
148
155
  images: [
@@ -157,7 +164,7 @@ articles in literature. Source: https://en.wikipedia.org/wiki/Stroop_effect`,
157
164
  * The image url must match the location of the image under the
158
165
  * src folder.
159
166
  */
160
- url: "assets/{{appName}}/img/assessmentExample.png",
167
+ url: "images/assessmentExample.png",
161
168
  },
162
169
  ],
163
170
  };
@@ -480,7 +487,7 @@ articles in literature. Source: https://en.wikipedia.org/wiki/Stroop_effect`,
480
487
  const activity = new {{className}}();
481
488
  const session = new Session({
482
489
  activities: [activity],
483
- canvasKitWasmUrl: "assets/canvaskit.wasm",
490
+ canvasKitWasmUrl: "canvaskit.wasm",
484
491
  sessionCallbacks: {
485
492
  /**
486
493
  * onSessionLifecycle() will be called on events such
@@ -14,9 +14,9 @@
14
14
  "devDependencies": {
15
15
  "@m2c2kit/build-helpers": "0.3.3",
16
16
  "@rollup/plugin-node-resolve": "15.0.2",
17
- "@rollup/plugin-typescript": "11.1.0",
17
+ "@rollup/plugin-typescript": "11.1.1",
18
18
  "rimraf": "5.0.0",
19
- "rollup": "3.20.6",
19
+ "rollup": "3.22.0",
20
20
  "rollup-plugin-copy": "3.4.0",
21
21
  "rollup-plugin-livereload": "2.0.5",
22
22
  "rollup-plugin-serve": "2.0.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m2c2kit/cli",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "description": "m2c2kit command line interface",
5
5
  "module": "dist/cli.js",
6
6
  "files": [
@@ -28,12 +28,12 @@
28
28
  "conf": "11.0.1",
29
29
  "form-data": "4.0.0",
30
30
  "handlebars": "4.7.7",
31
- "ora": "6.3.0",
31
+ "ora": "6.3.1",
32
32
  "prompts": "2.4.2",
33
- "yargs": "17.7.1"
33
+ "yargs": "17.7.2"
34
34
  },
35
35
  "devDependencies": {
36
- "@types/node": "18.15.12",
36
+ "@types/node": "18.16.2",
37
37
  "@types/prompts": "2.4.4",
38
38
  "@types/yargs": "17.0.24",
39
39
  "cpy-cli": "4.2.0",