Package Exports
- gulp-arweave
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gulp-arweave) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
gulp-s3 
(Based on https://github.com/nitaigao/gulp-s3)
Arweave plugin for gulp
Usage
First, install gulp-arweave as a development dependency:
npm install --save-dev gulp-arweaveThen, use it in your gulpfile.js:
var arweave = require('gulp-arweave')
var gulp = require('gulp')
const arweaveInit = {
host: 'arweave.net',
port: 443,
protocol: 'https',
jwk: "passwords/arweave-keyfile-XXX.json", // or specify the JWT object here, or use GULP_AIRWEAVE_JWK_FILE env var
};
const options = {};
gulp.src('./testfiles/**', {read: true})
.pipe(gulpAirweave(arweaveInit, options));Or you can pass an already initialized Arweave object as arweaveInit
The pipe returns an EventStream of pairs of an Arweave path and transaction ID.
API
options.uploadPath
Type: String
Default: ``
Set the remote folder on Arweave.
var options = { uploadPath: 'remote-folder' } // It will upload the 'src' into '/remote-folder'
gulp.src('./dist/**', {read: true})
.pipe(gulpAirweave(arweaveInit, options));options.tags
Set tags for every uploaded file. (If 'Content-Type' is unspecified, it is determined
automatically from file extensions.)
gulp.src('./testfiles/**', {read: true})
.pipe(gulpAirweave(arweaveInit, { tags: {'X-My-Tag', 'zzz'} }));options.encoding
Encoding for uploaded files.
options.rootFile
The index file (including its full path on the server).
options.disableManifest
Disable creating the Path Manifest file.
options.urlPrefix
Prefix to add to output URLs:
const options = { urlPrefix: 'https://arweave.net/' };
gulp.src('./testfiles/**', {read: true})
.pipe(gulpAirweave(arweaveInit, options));