@companieshouse/api-sdk-node 2.0.140 → 2.0.141
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 +15 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,7 +50,9 @@ import {createApiClient} from "@companieshouse/api-sdk-node";
|
|
|
50
50
|
|
|
51
51
|
## Development
|
|
52
52
|
|
|
53
|
-
To test the changes made to this sdk inside your project, you can use `npm link
|
|
53
|
+
To test the changes made to this sdk inside your project, you can use either `npm link` or modify the `prepare` script definition in your project's `package.json` file.
|
|
54
|
+
|
|
55
|
+
#### `npm link`
|
|
54
56
|
|
|
55
57
|
From within this directory, run the following command to make symbolic links to it within the global node modules directory.
|
|
56
58
|
|
|
@@ -62,6 +64,18 @@ Then from within your local project, simply link it with the following command
|
|
|
62
64
|
|
|
63
65
|
Note that if your local project is running within a Vagrant Virtual Machine, this command will need to be run on the VM.
|
|
64
66
|
|
|
67
|
+
#### `prepare` script
|
|
68
|
+
|
|
69
|
+
Change the definition of the `prepare` script in the package.json file to match the following, replacing `YOUR-BRANCH-NAME` with the name of the branch in the api-sdk-node repository that contains your changes:
|
|
70
|
+
|
|
71
|
+
"prepare": "husky install && npm install --save https://github.com/companieshouse/api-sdk-node/tarball/YOUR-BRANCH-NAME && cd node_modules/@companieshouse/api-sdk-node && npm run build"
|
|
72
|
+
|
|
73
|
+
(The `husky install` command should only be present if already there in the `prepare` script definition of your project)
|
|
74
|
+
|
|
75
|
+
Once done it should just be necessary to restart your project's service in Tilt (assumes that your local project is running in 'development mode').
|
|
76
|
+
|
|
77
|
+
Note that the `prepare` script change will need to be reverted, if wishing build and run unit-tests from the command-line, outside of the Docker environment. The change should NOT be committed or pushed to the project repository.
|
|
78
|
+
|
|
65
79
|
## Testing
|
|
66
80
|
|
|
67
81
|
[Jest](https://jestjs.io) is the framework used in this project and all tests can be run using npm.
|