license-cop 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/README.md +38 -1
  2. package/package.json +10 -1
package/README.md CHANGED
@@ -100,6 +100,43 @@ Set to `true` to make license-cop also check your dev-dependencies.
100
100
  `false` by default.
101
101
  Set to `true` to make license-cop only check your dev-dependencies.
102
102
 
103
+ ## CI/CD Example (GitHub Actions)
104
+
105
+ Running license-cop as a part of your CI process is a great way to catch issues before they land in your main branch.
106
+
107
+ Below is an example of how you can run license-cop in its own GitHub Action job for all PRs targetting main:
108
+
109
+ ```yaml
110
+ name: Check Licenses
111
+
112
+ on:
113
+ pull_request:
114
+ branches:
115
+ - main
116
+
117
+ jobs:
118
+ licenses:
119
+ name: Check Licenses
120
+
121
+ runs-on: ubuntu-latest
122
+
123
+ steps:
124
+ - uses: actions/checkout@v3
125
+
126
+ - name: Setup Node.js
127
+ uses: actions/setup-node@v3
128
+ with:
129
+ cache: npm
130
+
131
+ - name: Install dependencies
132
+ run: npm ci
133
+
134
+ - name: Run License-Cop
135
+ run: npx license-cop
136
+ ```
137
+
138
+ The Action above will fail if any of your node_modules have a license that isn't listed in your license-cop config file.
139
+
103
140
  ## License
104
141
 
105
- License-cop itself is licensed under the [ISC license](./LICENSE.md).
142
+ License-cop itself is licensed under the [ISC license](https://github.com/tobysmith568/license-cop/blob/main/LICENSE.md).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "license-cop",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "type": "commonjs",
5
5
  "bin": {
6
6
  "license-cop": "./src/bin/license-cop"
@@ -21,6 +21,15 @@
21
21
  "bugs": {
22
22
  "url": "https://github.com/tobysmith568/license-cop/issues"
23
23
  },
24
+ "keywords": [
25
+ "cli",
26
+ "license",
27
+ "licenses",
28
+ "license-cop",
29
+ "spdx",
30
+ "dependencies",
31
+ "oss"
32
+ ],
24
33
  "dependencies": {
25
34
  "@npmcli/arborist": "6.2.5",
26
35
  "arg": "5.0.2",