open-index/open-npm huggingface dataset:
npm package: @maiscrm/grunt-cdn
Description: Properly prepends a CDN url to those assets referenced with absolute paths (but not URLs)
Author: Johnny Halife
Latest version: 0.6.2

[![Build Status](https://travis-ci.org/tactivos/grunt-cdn.png)](https://travis-ci.org/tactivos/grunt-cdn.png)


[Grunt][grunt] plugin for properly prepending a CDN url to those assets referenced with absolute paths (but not URLs)

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

Install this grunt plugin next to your project's gruntfile with: `npm install grunt-cdn`

Then add this line to your project's `Gruntfile.js` gruntfile:

```javascript
grunt.loadNpmTasks('grunt-cdn');
```

Then specify your config:

```javascript
    grunt.initConfig({
        cdn: {
            options: {
                /** @required - root URL of your CDN (may contains sub-paths as shown below) */
                cdn: 'http://cdn.cloudfront.net/container/',
                /** @optional  - if provided both absolute and relative paths will be converted */
                flatten: false,
                /** @optional  - if provided will be added to the default supporting types */
                supportedTypes: { 'phtml': 'html' }
            },
            dist: {
                /** @required  - gets sources here, may be same as dest  */
                cwd: './dist/static/',
                /** @required  - puts results here with respect to relative paths  */
                dest: './dist/static/',
                /** @required  - files to process */
                src: ['index.html', '*.css', '{,*/}*.html', '{,**/}*.html'],
            }
        }
    });
```

### Example

With the following input

```html
<!DOCTYPE html>
<html>
<head>
    <title>Mural.ly</title>
    <link rel="stylesheet" type="text/css" href="/static/compiled.css?v=13512tyu3kds" />
</head>
<body id="landing-page">
...
</body>
</html>
```

After running the task the output looks like

```html
<!DOCTYPE html>
<html>
<head>
    <title>Mural.ly</title>
    <link rel="stylesheet" type="text/css" href="http://cdn.cloudfront.net/container/static/compiled.css?v=13512tyu3kds" />
</head>
<body id="landing-page">
...
</body>
</html>
```

As you can see we maintain the "container" pathname in this case, and we also keep the original
query strings. This task is really handy if you upload stuff from your CI to make it transparent
to developers.

## Release History
* 0.1.3 Grunt 0.4 ready
* 0.1.0 Initial Release

[grunt]: https://github.com/cowboy/grunt
npm package: @maiscrm/grunt-filerev-replace
Description: Replace references to grunt-filerev files.
Author: Joannic Laborde
Latest version: 0.1.5

# grunt-filerev-replace

> Replace references to grunt-filerev files.

## Getting Started
This plugin requires Grunt `>=0.4.2`

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-filerev-replace --save-dev
```

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

```js
grunt.loadNpmTasks('grunt-filerev-replace');
```

## The "filerev_replace" task

### Overview
In your project's Gruntfile, add a section named `filerev_replace` to the data object passed into `grunt.initConfig()`. See the test files for a working example.

```js
grunt.initConfig({
  // Filerev all images
  filerev: {
    images: { src: 'tmp/assets/images/**/*' }
  },

  // Replace references to the images in the compiled js and css files, and the html views
  filerev_replace: {
    options: {
      assets_root: 'tmp/assets/'
    },
    compiled_assets: {
      src: 'tmp/assets/compiled/*.{css,js}'
    },
    views: {
      options: {
        views_root: 'tmp/views/'
      },
      src: 'tmp/views/**/*.html'
    }
  }
});
```

### Options

#### options.assets_root
Type: `String`
Required

The root path from where assets are served by the web application.

#### options.views_root
Type: `String`
Default value: assets_root

The root path from where views are served by the web application.

## 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/).

## Release History
_(Nothing yet)_