grunt-nar
v0.4.0
Published
Create and extract nar archives
Downloads
32
Maintainers
Readme
grunt-nar
Getting Started
This plugin requires Grunt ~0.4.2
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins
Installation
Install nar as global package
$ nar install -g nar
Install the plugin
$ npm install grunt-nar --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-nar')
Usage
Create
grunt.initConfig({
nar: {
create: {
src: 'package.json',
dest: 'archives/'
}
}
})
Extract
grunt.initConfig({
nar: {
options: { mode: 'extract' },
src: 'app-0.1.0.nar',
dest: 'files/'
}
})
See Gruntfile for more examples
Options
mode
Type: string
Default: create
Define the operation mode. Possible values are: create
and extract
For aditional avaiable options, see create and extract supported options in nar
executable
Type: boolean
Default: false
Creates an executable binary-like archive
The generated archive will be fully self-contained, which means
that node
and any runtime dependency will be embedded,
and therefore you just can deploy and run it as binary
os
Type: string
Default: current os
Specify the target OS for the nar executable.
Applied only if the executable
options is true
Supported values are: linux
, darwin
, sunos
arch
Type: string
Default: current processor arch
Specify the target processor architecture binary type for the nar executable.
Applied only if the executable
options is true
Supported values are: x86
, x64
node
Type: string
Default: current node version
Specify the node.js version to embed in the nar executable.
Applied only if the executable
options is true
Supported versions must be equal or higher that 0.8.x
License
MIT © Tomas Aparicio