grunt-nar
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
Install nar
as global package
$ nar install -g nar
Install the task
$ 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')
grunt.initConfig({
nar: {
create: {
src: 'package.json',
dest: 'archives/'
}
}
})
grunt.initConfig({
nar: {
options: { mode: 'extract' },
src: 'app-0.1.0.nar',
dest: 'files/'
}
})
See Gruntfile for more examples
Type: string
Default: create
Define the operation mode. Possible values are: create
and extract
For aditional available options, see create and extract supported options in nar
For package.json
params, see the configuration documentation
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
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
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
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
MIT © Tomas Aparicio