npm-pkgbuild 8.0.2 → 8.0.3
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 +70 -51
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -11,18 +11,37 @@
|
|
|
11
11
|
|
|
12
12
|
## npm-pkgbuild
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Create ArchLinux, RPM and Debian packages from npm packages.
|
|
15
15
|
|
|
16
16
|
# usage
|
|
17
17
|
|
|
18
18
|
In a package directory execute
|
|
19
19
|
|
|
20
20
|
```shell
|
|
21
|
-
npm-pkgbuild --
|
|
21
|
+
npm-pkgbuild --rpm --debian --arch --content build
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
This will create a
|
|
25
|
-
|
|
24
|
+
This will create a arch, rpm and a debian package of the build dir.
|
|
25
|
+
|
|
26
|
+
You can specify the package content in package.json.
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"pkg": {
|
|
31
|
+
"content": {
|
|
32
|
+
"/some/location" : { "base": "build" },
|
|
33
|
+
"/etc/myconfig.json" : "sample-config.json"
|
|
34
|
+
},
|
|
35
|
+
"hooks" : "pkg/hooks",
|
|
36
|
+
"output": {
|
|
37
|
+
"debian" : {},
|
|
38
|
+
"rpm" : {},
|
|
39
|
+
"arch" : {}
|
|
40
|
+
},
|
|
41
|
+
"dependencies": { "nginx" : ">=1.12" }
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
26
45
|
|
|
27
46
|
# API
|
|
28
47
|
|
|
@@ -47,23 +66,23 @@ The resulting pkg will contain the package dist content and all production depen
|
|
|
47
66
|
* [fields](#fields-2)
|
|
48
67
|
* [hookMapping](#hookmapping)
|
|
49
68
|
* [hookMapping](#hookmapping-1)
|
|
50
|
-
* [Field](#field)
|
|
51
|
-
* [Properties](#properties)
|
|
52
|
-
* [Packager](#packager)
|
|
53
|
-
* [Parameters](#parameters-3)
|
|
54
|
-
* [tmpdir](#tmpdir)
|
|
55
|
-
* [execute](#execute)
|
|
56
|
-
* [Parameters](#parameters-4)
|
|
57
69
|
* [decodePassword](#decodepassword)
|
|
58
|
-
* [Parameters](#parameters-
|
|
70
|
+
* [Parameters](#parameters-3)
|
|
59
71
|
* [extractFunctions](#extractfunctions)
|
|
60
|
-
* [Parameters](#parameters-
|
|
72
|
+
* [Parameters](#parameters-4)
|
|
61
73
|
* [fieldProvider](#fieldprovider)
|
|
62
|
-
* [Parameters](#parameters-
|
|
74
|
+
* [Parameters](#parameters-5)
|
|
63
75
|
* [Expander](#expander)
|
|
64
|
-
* [Parameters](#parameters-
|
|
76
|
+
* [Parameters](#parameters-6)
|
|
65
77
|
* [copyEntries](#copyentries)
|
|
66
|
-
* [Parameters](#parameters-
|
|
78
|
+
* [Parameters](#parameters-7)
|
|
79
|
+
* [Field](#field)
|
|
80
|
+
* [Properties](#properties)
|
|
81
|
+
* [Packager](#packager)
|
|
82
|
+
* [Parameters](#parameters-8)
|
|
83
|
+
* [tmpdir](#tmpdir)
|
|
84
|
+
* [execute](#execute)
|
|
85
|
+
* [Parameters](#parameters-9)
|
|
67
86
|
|
|
68
87
|
## ContentProvider
|
|
69
88
|
|
|
@@ -147,41 +166,6 @@ map install hook named from arch to deb
|
|
|
147
166
|
|
|
148
167
|
map install hook named from arch to rpm
|
|
149
168
|
|
|
150
|
-
## Field
|
|
151
|
-
|
|
152
|
-
Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
153
|
-
|
|
154
|
-
### Properties
|
|
155
|
-
|
|
156
|
-
* `alias` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** interchangeable field name
|
|
157
|
-
* `type` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
158
|
-
* `default` **any**
|
|
159
|
-
* `mandatory` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**
|
|
160
|
-
|
|
161
|
-
## Packager
|
|
162
|
-
|
|
163
|
-
### Parameters
|
|
164
|
-
|
|
165
|
-
* `properties` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
|
|
166
|
-
|
|
167
|
-
### tmpdir
|
|
168
|
-
|
|
169
|
-
Create tmp directory.
|
|
170
|
-
|
|
171
|
-
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** directory path
|
|
172
|
-
|
|
173
|
-
### execute
|
|
174
|
-
|
|
175
|
-
Execute package generation
|
|
176
|
-
|
|
177
|
-
#### Parameters
|
|
178
|
-
|
|
179
|
-
* `sources`
|
|
180
|
-
* `transformer`
|
|
181
|
-
* `dependencies`
|
|
182
|
-
* `options`
|
|
183
|
-
* `expander`
|
|
184
|
-
|
|
185
169
|
## decodePassword
|
|
186
170
|
|
|
187
171
|
Decode a password
|
|
@@ -232,6 +216,41 @@ Copy content from source into destinationDirectory.
|
|
|
232
216
|
* `expander` **[Expander](#expander)** (optional, default `v=>v`)
|
|
233
217
|
* `attributes` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<ContentEntryAttribute>**
|
|
234
218
|
|
|
219
|
+
## Field
|
|
220
|
+
|
|
221
|
+
Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
222
|
+
|
|
223
|
+
### Properties
|
|
224
|
+
|
|
225
|
+
* `alias` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** interchangeable field name
|
|
226
|
+
* `type` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
227
|
+
* `default` **any**
|
|
228
|
+
* `mandatory` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**
|
|
229
|
+
|
|
230
|
+
## Packager
|
|
231
|
+
|
|
232
|
+
### Parameters
|
|
233
|
+
|
|
234
|
+
* `properties` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
|
|
235
|
+
|
|
236
|
+
### tmpdir
|
|
237
|
+
|
|
238
|
+
Create tmp directory.
|
|
239
|
+
|
|
240
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** directory path
|
|
241
|
+
|
|
242
|
+
### execute
|
|
243
|
+
|
|
244
|
+
Execute package generation
|
|
245
|
+
|
|
246
|
+
#### Parameters
|
|
247
|
+
|
|
248
|
+
* `sources`
|
|
249
|
+
* `transformer`
|
|
250
|
+
* `dependencies`
|
|
251
|
+
* `options`
|
|
252
|
+
* `expander`
|
|
253
|
+
|
|
235
254
|
# install
|
|
236
255
|
|
|
237
256
|
With [npm](http://npmjs.org) do:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "npm-pkgbuild",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -10,10 +10,12 @@
|
|
|
10
10
|
},
|
|
11
11
|
"description": "create ArchLinux, RPM and Debian packages from npm packages",
|
|
12
12
|
"keywords": [
|
|
13
|
+
"package",
|
|
13
14
|
"ArchLinux",
|
|
14
15
|
"arch-linux",
|
|
15
16
|
"aur",
|
|
16
17
|
"debian",
|
|
18
|
+
"deb",
|
|
17
19
|
"pacman",
|
|
18
20
|
"pkgbuild",
|
|
19
21
|
"rpm",
|
|
@@ -64,7 +66,7 @@
|
|
|
64
66
|
"stream-buffers": "^3.0.2"
|
|
65
67
|
},
|
|
66
68
|
"engines": {
|
|
67
|
-
"node": ">=16.
|
|
69
|
+
"node": ">=16.14.2"
|
|
68
70
|
},
|
|
69
71
|
"repository": {
|
|
70
72
|
"type": "git",
|