@citolab/tspci 2.5.15 → 2.5.17

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/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 2.5.17 (2024-10-15)
7
+
8
+ **Note:** Version bump only for package @citolab/tspci
9
+
10
+
11
+
12
+
13
+
14
+ ## 2.5.16 (2024-10-15)
15
+
16
+ **Note:** Version bump only for package @citolab/tspci
17
+
18
+
19
+
20
+
21
+
6
22
  ## 2.5.15 (2024-10-11)
7
23
 
8
24
  **Note:** Version bump only for package @citolab/tspci
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citolab/tspci",
3
- "version": "2.5.15",
3
+ "version": "2.5.17",
4
4
  "description": "an opiniated typescript ims-pci builder with tao integration",
5
5
  "author": "patrick <patrick.deklein@cito.nl>",
6
6
  "repository": "@citolab/tspci",
@@ -39,12 +39,12 @@
39
39
  "rollup": "^4.21.3",
40
40
  "rollup-plugin-copy": "^3.5.0",
41
41
  "rollup-plugin-live-server": "^2.0.0",
42
+ "rollup-plugin-livereload": "^2.0.5",
42
43
  "rollup-plugin-node-builtins": "^2.1.2",
43
44
  "rollup-plugin-node-globals": "^1.4.0",
44
45
  "rollup-plugin-postcss": "^4.0.2",
45
46
  "rollup-plugin-string": "^3.0.0",
46
- "rollup-plugin-watch-assets": "^1.0.1",
47
47
  "tailwindcss": "^3.4.11"
48
48
  },
49
- "gitHead": "1970a9a73da54053545f3b9a470dcad44c8abd21"
49
+ "gitHead": "a0511a6f9b5fac4eda771021b4ac42e2d9feca94"
50
50
  }
package/src/cli.js CHANGED
@@ -185,10 +185,10 @@ const run = async () => {
185
185
  const help = args.indexOf("--help") >= 0 || args.indexOf("-h") >= 0;
186
186
  const watch = args.indexOf("--watch") >= 0 || args.indexOf("-w") >= 0;
187
187
  const dev = args.indexOf("--dev") >= 0 || args.indexOf("-d") >= 0;
188
- const t = args.indexOf("--target") >= 0 || args.indexOf("-t") >= 0;
189
- const tExt = args.indexOf("--targetExt") >= 0 || args.indexOf("-tx") >= 0;
188
+ const t = args.indexOf("--target") !== -1 ? args.indexOf("--target") : args.indexOf("-t");
189
+ const tExt = args.indexOf("--targetExt") !== -1 ? args.indexOf("--targetExt") : args.indexOf("-tx");
190
190
  const init = args.indexOf("init") >= 0;
191
- const targetName = t !== -1 ? `@citolab/tspci-${t}` : tExt !== -1 ? tExt : null;
191
+ const targetName = t !== -1 ? `@citolab/tspci-${args[t]}` : tExt !== -1 ? args[tExt] : null;
192
192
 
193
193
  if (help) {
194
194
  console.log(`•\t${chalk.blueBright("--help -h")} list these commands`);
@@ -1,28 +1,36 @@
1
- import watchAssets from 'rollup-plugin-watch-assets';
1
+ import copy from "rollup-plugin-copy";
2
+ import livereload from "rollup-plugin-livereload";
2
3
  // PK: not the official npm package, but a copy, needed watch functinoality
3
4
  import { liveServer } from "./rollup-plugin-live-server.js";
4
5
 
5
6
  import path from "path";
6
7
 
7
- const PACKAGE_ROOT_PATH = process.cwd()
8
- const PACKAGE_DIST_PATH = path.join(PACKAGE_ROOT_PATH, "dist")
8
+ const PACKAGE_ROOT_PATH = process.cwd();
9
+ const PACKAGE_DIST_PATH = path.join(PACKAGE_ROOT_PATH, "dist");
9
10
 
10
11
  const livesrvr = liveServer({
11
12
  root: path.join(PACKAGE_ROOT_PATH),
12
13
  mount: [["/", "./dist"]],
13
14
  open: true,
14
15
  wait: 500,
15
- watch: PACKAGE_DIST_PATH
16
+ watch: PACKAGE_DIST_PATH,
16
17
  });
17
18
 
18
- const watchassets = watchAssets({ assets: ['./src/**/*.json', './src/**/*.svg', './src/**/*.png'] })
19
+ const watchassets = copy({
20
+ targets: [
21
+ { src: "./src/**/*.json", dest: "dist" },
22
+ { src: "./src/**/*.svg", dest: "dist" },
23
+ { src: "./src/**/*.png", dest: "dist" },
24
+ ],
25
+ watch: true, // Enable watching for changes
26
+ });
19
27
 
20
28
  import rollupConfig from "./rollup.config.js";
21
29
 
22
30
  const newRollupConfig = {
23
31
  ...rollupConfig,
24
32
  output: rollupConfig.output.map((output) => ({ ...output, sourcemap: true })),
25
- plugins: [...rollupConfig.plugins, livesrvr, watchassets],
33
+ plugins: [watchassets, livereload(PACKAGE_DIST_PATH), livesrvr],
26
34
  };
27
35
 
28
36
  export default newRollupConfig;