README
npm-pkgbuild
create ArchLinux, RPM and Debian packages from npm packages.
usage
In a package directory execute
npm-pkgbuild --pkg
This will create a PKGBUILD file and execute it The resulting pkg will contain the package dist content and all production dependencies
API
Table of Contents
- ContentProvider
- FileContentProvider
- NodeModulesContentProvider
- NPMPackContentProvider
- pkgKeyValuePairOptions
- fields
- fields
- fields
- Field
- Packager
- hookMapping
- extractFunctions
- fieldProvider
- Expander
- copyEntries
ContentProvider
Source of package content.
asyncIterator
List all entries.
Returns asyncIterator<ContentEntry> all entries
FileContentProvider
Extends ContentProvider
Content provided form the file system.
Parameters
entryProperties
name
Returns string name of the content provider
NodeModulesContentProvider
Extends ContentProvider
Content from node_modules
Parameters
definitions
entryProperties
name
Returns string name of the content provider
NPMPackContentProvider
Extends ContentProvider
Content from npm pack.
Parameters
definitions
entryProperties
name
Returns string name of the content provider
pkgKeyValuePairOptions
fields
well known package properties https://www.archlinux.org/pacman/PKGBUILD.5.html
fields
- See: https://www.debian.org/doc/debian-policy/ch-controlfields.html
- See: https://linux.die.net/man/5/deb-control
fields
Field
Type: Object
Properties
Packager
Parameters
properties
Object
tmpdir
Create tmp directory.
Returns Promise<string> directory path
execute
Execute package generation
Parameters
sources
transformer
dependencies
options
expander
hookMapping
map install hook named from arch to rpm
extractFunctions
Extract shell functions from a given text
Parameters
source
AsyncIterator<string>
Returns AsyncIterator<FunctionDecl>
fieldProvider
Parameters
Returns Function
Expander
Type: Function
Parameters
path
string
Returns string
copyEntries
Copy content from source into destinationDirectory.
Parameters
source
AsyncIterator<ContentEntry>destinationDirectory
stringexpander
Expander (optional, defaultv=>v
)attributes
Array<ContentEntryAttribute>
install
With npm do:
npm install npm-pkgbuild
license
BSD-2-Clause