@m2c2kit/cli 0.3.3 → 0.3.5
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 +4 -2
- package/dist/.env +1 -1
- package/dist/templates/README.md.handlebars +1 -1
- package/dist/templates/launch.json.handlebars +1 -1
- package/dist/templates/package.json.handlebars +10 -10
- package/dist/templates/rollup.config.mjs.handlebars +8 -6
- package/dist/templates/tsconfig.json.handlebars +3 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,8 +4,10 @@ This package contains a command line interface (CLI) for developing m2c2kit cogn
|
|
|
4
4
|
|
|
5
5
|
## Prerequisites
|
|
6
6
|
|
|
7
|
-
- [Node.js](https://nodejs.org) (version >=
|
|
8
|
-
- [Visual Studio Code](https://code.visualstudio.com/download)
|
|
7
|
+
- [Node.js](https://nodejs.org/en/download) (version >=18; LTS release suggested). **Required**.
|
|
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
11
|
|
|
10
12
|
## Creating a cognitive assessment
|
|
11
13
|
|
package/dist/.env
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
CLI_VERSION=0.3.
|
|
1
|
+
CLI_VERSION=0.3.5
|
|
@@ -4,7 +4,7 @@ This project was generated with the m2c2kit CLI version {{cliVersion}}.
|
|
|
4
4
|
|
|
5
5
|
## Development server
|
|
6
6
|
|
|
7
|
-
Run `npm run serve` from the command line for a development server. Browse to `http://localhost:3000/`. The app will automatically compile and reload when you change source files. If you get an error on the reload, edit `rollup.config.
|
|
7
|
+
Run `npm run serve` from the command line for a development server. Browse to `http://localhost:3000/`. The app will automatically compile and reload when you change source files. If you get an error on the reload, edit `rollup.config.mjs` and increase the delay parameter (unit is milliseconds) in this line:
|
|
8
8
|
|
|
9
9
|
livereload({ watch: "build", delay: 250 })
|
|
10
10
|
|
|
@@ -3,24 +3,24 @@
|
|
|
3
3
|
"version": "1.0.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"serve": "rollup -c rollup.config.mjs --watch --configServe",
|
|
6
|
-
"build": "rollup -c rollup.config.mjs --configProd",
|
|
7
|
-
"clean": "rimraf build dist .rollup.cache"
|
|
6
|
+
"build": "npm run clean && rollup -c rollup.config.mjs --configProd",
|
|
7
|
+
"clean": "rimraf build dist .rollup.cache tsconfig.tsbuildinfo"
|
|
8
8
|
},
|
|
9
9
|
"private": true,
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@m2c2kit/addons": "0.3.
|
|
12
|
-
"@m2c2kit/core": "0.3.
|
|
11
|
+
"@m2c2kit/addons": "0.3.3",
|
|
12
|
+
"@m2c2kit/core": "0.3.6"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@m2c2kit/build-helpers": "0.3.
|
|
16
|
-
"@rollup/plugin-node-resolve": "15.0.
|
|
17
|
-
"@rollup/plugin-typescript": "11.
|
|
18
|
-
"rimraf": "
|
|
19
|
-
"rollup": "3.20.
|
|
15
|
+
"@m2c2kit/build-helpers": "0.3.3",
|
|
16
|
+
"@rollup/plugin-node-resolve": "15.0.2",
|
|
17
|
+
"@rollup/plugin-typescript": "11.1.0",
|
|
18
|
+
"rimraf": "5.0.0",
|
|
19
|
+
"rollup": "3.20.6",
|
|
20
20
|
"rollup-plugin-copy": "3.4.0",
|
|
21
21
|
"rollup-plugin-livereload": "2.0.5",
|
|
22
22
|
"rollup-plugin-serve": "2.0.2",
|
|
23
23
|
"tslib": "2.5.0",
|
|
24
|
-
"typescript": "5.0.
|
|
24
|
+
"typescript": "5.0.4"
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -7,9 +7,10 @@ import { hashM2c2kitAssets } from "@m2c2kit/build-helpers";
|
|
|
7
7
|
|
|
8
8
|
export default (commandLineArgs) => {
|
|
9
9
|
const isDebug = commandLineArgs.configServe ? true : false;
|
|
10
|
+
const isProduction = commandLineArgs.configProd ? true : false;
|
|
10
11
|
|
|
11
12
|
let outputFolder = "build";
|
|
12
|
-
if (
|
|
13
|
+
if (isProduction) {
|
|
13
14
|
outputFolder = "dist";
|
|
14
15
|
}
|
|
15
16
|
|
|
@@ -19,14 +20,15 @@ export default (commandLineArgs) => {
|
|
|
19
20
|
output: [
|
|
20
21
|
{
|
|
21
22
|
file: `./${outputFolder}/index.js`,
|
|
22
|
-
format: "
|
|
23
|
+
format: "es",
|
|
23
24
|
sourcemap: isDebug,
|
|
25
|
+
sourcemapExcludeSources: true
|
|
24
26
|
},
|
|
25
27
|
],
|
|
26
28
|
plugins: [
|
|
27
29
|
nodeResolve(),
|
|
28
30
|
typescript({
|
|
29
|
-
sourceMap:
|
|
31
|
+
sourceMap: isDebug && true,
|
|
30
32
|
}),
|
|
31
33
|
copy({
|
|
32
34
|
targets: [
|
|
@@ -40,10 +42,10 @@ export default (commandLineArgs) => {
|
|
|
40
42
|
},
|
|
41
43
|
],
|
|
42
44
|
}),
|
|
43
|
-
|
|
45
|
+
isProduction &&
|
|
44
46
|
!commandLineArgs.configNoHash &&
|
|
45
47
|
hashM2c2kitAssets(outputFolder),
|
|
46
|
-
|
|
48
|
+
isDebug &&
|
|
47
49
|
serve({
|
|
48
50
|
/**
|
|
49
51
|
* Start development server and automatically open browser with
|
|
@@ -58,7 +60,7 @@ export default (commandLineArgs) => {
|
|
|
58
60
|
host: "localhost",
|
|
59
61
|
port: 3000,
|
|
60
62
|
}),
|
|
61
|
-
|
|
63
|
+
isDebug &&
|
|
62
64
|
/**
|
|
63
65
|
* Try a shorter delay for quicker reloads, but increase it if
|
|
64
66
|
* the browser reloads before the new build is fully ready.
|
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
"esModuleInterop": true,
|
|
9
9
|
"forceConsistentCasingInFileNames": true,
|
|
10
10
|
"strict": true,
|
|
11
|
+
"outDir": "build",
|
|
12
|
+
"rootDir": "src",
|
|
11
13
|
"skipLibCheck": true,
|
|
12
14
|
},
|
|
13
|
-
"
|
|
15
|
+
"include": ["./src/**/*.ts", "./src/**/*.js"]
|
|
14
16
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m2c2kit/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "m2c2kit command line interface",
|
|
5
5
|
"module": "dist/cli.js",
|
|
6
6
|
"files": [
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"yargs": "17.7.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@types/node": "18.15.
|
|
36
|
+
"@types/node": "18.15.12",
|
|
37
37
|
"@types/prompts": "2.4.4",
|
|
38
38
|
"@types/yargs": "17.0.24",
|
|
39
39
|
"cpy-cli": "4.2.0",
|