https://github.com/h2non/gulp-nar
Create and extract nar archives from Gulp
https://github.com/h2non/gulp-nar
Last synced: about 2 months ago
JSON representation
Create and extract nar archives from Gulp
- Host: GitHub
- URL: https://github.com/h2non/gulp-nar
- Owner: h2non
- License: mit
- Created: 2014-04-18T12:00:16.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-01-30T00:17:17.000Z (over 10 years ago)
- Last Synced: 2024-10-18T11:25:22.121Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 305 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-[nar](https://github.com/h2non/nar) [][travis] [][gemnasium] [][npm]
> Create and extract [nar](https://github.com/h2non/nar) archives from [Gulp](http://gulpjs.com)
## Installation
Install the task
```bash
$ npm install gulp-nar --save-dev
```## Usage
```js
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][example] for more examples
## API
### nar.create(path, options)
Creates an archive according to the `package.json` [configuration](https://github.com/h2non/nar#configuration)
- **path** `string` Destination directory for the nar archive. Default to current directory
- **options** `object` Archive creation [options](https://github.com/h2non/nar#narcreateoptions)### nar.createExecutable(path, options)
Creates an [executable binary-like](https://github.com/h2non/nar#executables) archive
- **path** `string` Destination directory for the nar archive. Default to current directory
- **options** `object` Executable creation [options](https://github.com/h2non/nar#narcreateexecoptions)### 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](https://github.com/h2non/nar#narextractoptions)## License
[MIT](http://opensource.org/licenses/MIT) © Tomas Aparicio
[travis]: https://travis-ci.org/h2non/gulp-nar
[gemnasium]: https://gemnasium.com/h2non/gulp-nar
[npm]: http://npmjs.org/package/gulp-nar
[example]: https://github.com/h2non/gulp-nar/blob/master/gulpfile.js