@m2c2kit/cli 0.3.3 → 0.3.4

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 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 >=16)
8
- - [Visual Studio Code](https://code.visualstudio.com/download) is highly recommended
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.3
1
+ CLI_VERSION=0.3.4
@@ -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.js` and increase the delay parameter (unit is milliseconds) in this line:
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
 
@@ -5,7 +5,7 @@
5
5
  "version": "0.2.0",
6
6
  "configurations": [
7
7
  {
8
- "type": "pwa-chrome",
8
+ "type": "chrome",
9
9
  "request": "launch",
10
10
  "name": "Launch Chrome against localhost",
11
11
  "url": "http://localhost:3000",
@@ -3,8 +3,8 @@
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": {
@@ -13,14 +13,14 @@
13
13
  },
14
14
  "devDependencies": {
15
15
  "@m2c2kit/build-helpers": "0.3.2",
16
- "@rollup/plugin-node-resolve": "15.0.1",
17
- "@rollup/plugin-typescript": "11.0.0",
18
- "rimraf": "4.4.1",
19
- "rollup": "3.20.2",
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.3"
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 (commandLineArgs.configProd) {
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: "esm",
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: commandLineArgs.configServe && true,
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
- commandLineArgs.configProd &&
45
+ isProduction &&
44
46
  !commandLineArgs.configNoHash &&
45
47
  hashM2c2kitAssets(outputFolder),
46
- commandLineArgs.configServe &&
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
- commandLineArgs.configServe &&
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
- "exclude": ["node_modules", "build", "dist", "rollup.config.mjs", "post-install.mjs"]
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",
3
+ "version": "0.3.4",
4
4
  "description": "m2c2kit command line interface",
5
5
  "module": "dist/cli.js",
6
6
  "files": [