# grunt-getsave-async

> Save files to the file system the async way. Uses promises

Latest version **0.1.0** (published 2017-01-11) · 0 weekly downloads

## Install

```sh
npm install grunt-getsave-async
pnpm add grunt-getsave-async
yarn add grunt-getsave-async
bun add grunt-getsave-async
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2017-01-11 |
| First published | 2017-01-11 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | K Chetan |
| Maintainers | kchetan |
| Keywords | gruntplugin |

## Links

- npm: https://www.npmjs.com/package/grunt-getsave-async
- Repository: https://github.com/kchetan92/grunt-getsave-asyc
- Issues: https://github.com/kchetan92/grunt-getsave-asyc/issues
- npm.io page: https://npm.io/package/grunt-getsave-async

## Recent versions

- 0.1.0 (latest) — 2017-01-11

## README

# grunt-getsave-async

> Save files to the file system the async way. Uses promises

## Getting Started
This plugin requires Grunt `~0.4.5`

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

```shell
npm install grunt-getsave_async --save-dev
```

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

```js
grunt.loadNpmTasks('grunt-getsave_async');
```

## The "getsave_async" task

### Overview
In your project's Gruntfile, add a section named `getsave_async` to the data object passed into `grunt.initConfig()`.

```js
grunt.initConfig({
  getsave_async: {
    options: {
      "https":true
    },
    your_target: [
      {
        "get":"URL of the file to GET"
        "loc":"Location of file to be saved"
      },
      {
        "get":"URL of the file to GET"
        "loc":"Location of file to be saved"
      }
    ],
  },
});
```

### Usage Examples

#### Default Options

All files can either be set to fetch through HTTPS ot HTTP using the "https" option.

```js
grunt.initConfig({
    getsave_async: {
      "target":[
        {
          "get":"https://placeholdit.imgix.net/~text?txtsize=33&txt=this1&w=352&h=150",
          "loc":"output/img1.png"
        },
        {
          "get":"https://placeholdit.imgix.net/~text?txtsize=33&txt=this2&w=352&h=150",
          "loc":"output/img2.png"
        },
        {
          "get":"https://placeholdit.imgix.net/~text?txtsize=33&txt=this3&w=352&h=150",
          "loc":"output/img3.png"
        },
        {
          "get":"https://placeholdit.imgix.net/~text?txtsize=33&txt=this4&w=352&h=150",
          "loc":"output/img4.png"
        }
      ],
      "options": {
        "https": true
      }
    }
});
```

## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).
Comments and suggestions are always welcome.

## Release History
_(Nothing yet)_

---
_Source: https://npm.io/package/grunt-getsave-async · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
