Create and extract nar archives from Gulp
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
fixtures
.editorconfig
.gitignore
.npmignore
.travis.yml
LICENSE
README.md
gulpfile.js
index.js
package.json
test.js

README.md

gulp-nar Build Status Dependency Status NPM version

Create and extract nar archives from Gulp

Installation

Install the task

$ npm install gulp-nar --save-dev

Usage

var gulp = require('gulp')
var nar = require('gulp-nar')

gulp.task('create', function () {
  gulp.src('package.json')
    .pipe(nar.create('releases/'))
})

gulp.task('create-executable', function () {
  gulp.src('package.json')
    .pipe(nar.createExecutable('releases/'))
})

gulp.task('extract', function () {
  gulp.src('app.nar')
    .pipe(nar.extract('app/'))
})

See gulpfile.js for more examples

API

nar.create(path, options)

Creates an archive according to the package.json configuration

  • path string Destination directory for the nar archive. Default to current directory
  • options object Archive creation options

nar.createExecutable(path, options)

Creates an executable binary-like archive

  • path string Destination directory for the nar archive. Default to current directory
  • options object Executable creation options

nar.extract(path, options)

Extract archive content into a directory

  • path string Destination directory for the extracted files. Default to current directory
  • options object Archive extract options

License

MIT © Tomas Aparicio