grunt-ipfs

0.1.2 • Public • Published

grunt-ipfs

Simple ipfs tasks for grunt

Getting Started

This plugin requires Grunt ~0.4.5

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. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-ipfs --save-dev 

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-ipfs');

The "ipfsadd" task

Add a file to ipfs

grunt.initConfig({
  ipfsadd: {
    default:{
      options: {
        files:['myFile.txt']
        ,output:'hashes.json'     //optional
      }
    }
  },
});

The "ipfsget" task

Get a file from ipfs and save it to your filesystem

grunt.initConfig({
  ipfsget: {
    default:{
      options: {
        hash: 'QmeHAUST7aL9ZCyqo7JyUfPXQzPmhYV2WSmAUz7Mhk7kmG'
        ,output:'myFile.txt'    //optional, defaults to options.hash
      }
    }
  },
});

Readme

Keywords

Package Sidebar

Install

npm i grunt-ipfs

Weekly Downloads

1

Version

0.1.2

License

none

Last publish

Collaborators

  • aakilfernandes