grunt-get-remote

1.0.0 • Public • Published

grunt-get-remote

License NPM version Dependencies Peer Dependencies Downloads

Fetch remote assets for your build tasks.

$ npm i grunt-get-remote --save-dev

Get-remote is allows you to prefetch your remote assets to roll them into your own site bundle. Task will work for any type of asset - images, scripts, css files, etc. This is a great way to bypass slow 3rd party cdn's.

Task Configuration

Just pass in a filename and its corresponding url.

'get-remote': {
    libraries: {
        files: {
            'gpt.js': 'www.googletagservices.com/tag/js/gpt.js',
            'jquery.js': 'https://code.jquery.com/jquery-2.2.4.min.js'
        }
    }
}

options.root

Optional. Define a custom install directory. The default location is remote_components.

'get-remote': {
    options: {
        root: 'optional/root-directory'
    }
}

The task can be loaded like any other grunt contrib:

grunt.loadNpmTasks('grunt-get-remote');

Package Sidebar

Install

npm i grunt-get-remote

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • cobbdb