@transitive-sdk/utils-caps 0.1.0 → 0.1.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transitive-sdk/utils-caps",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Utilities to build and run Transitive capabilities in dev",
5
5
  "homepage": "https://transitiverobotics.com",
6
6
  "repository": {
@@ -17,11 +17,11 @@
17
17
  "robotics"
18
18
  ],
19
19
  "bin": {
20
- "subScript": "subScript.sh",
21
20
  "transitiveDev": "transitiveDev.sh"
22
21
  },
23
22
  "scripts": {
24
- "test": "echo \"Error: no test specified\" && exit 1"
23
+ "test": "echo \"Error: no test specified\" && exit 1",
24
+ "postinstall": "cp subScript $npm_config_local_prefix/subScript"
25
25
  },
26
26
  "license": "Apache-2.0",
27
27
  "publishConfig": {
@@ -1,7 +1,9 @@
1
1
  #!/bin/bash
2
2
 
3
+ # This file gets updated by @transitive-sdk/utils-caps. Do not modify!
4
+
3
5
  # Use this script in your wrapper package's script to relay invokation to scripts
4
- # int he correct subproject.
6
+ # in the correct subproject.
5
7
 
6
8
  # Define a mapping from lifecycle events to scripts in sub-project. Note that
7
9
  # we *don't* want to map preinstall to preinstall, since in the subproject
@@ -40,6 +42,12 @@ fi;
40
42
  if [[ $SUBPROJECT ]]; then
41
43
  if [[ ${npmCommands[$npm_lifecycle_event]} ]]; then
42
44
  echo "Invoking $npm_lifecycle_event in $SUBPROJECT"
45
+
46
+ if [[ $npm_command == "ci" ]] && [[ $npm_lifecycle_event == "install" ]]; then
47
+ echo "ci: Removing $SUBPROJECT/node_modules"
48
+ rm -rf $SUBPROJECT/node_modules
49
+ fi;
50
+
43
51
  npm $PREFIX $npm_lifecycle_event
44
52
  else
45
53
  echo "Invoking $SUBSCRIPT in $SUBPROJECT"