<commit_before># Important note for Craft CMS users
Because Composer doesn't let you install to a folder of your choice, at the current time we are hijacking the [composer/installers](https://github.com/composer/installers) package for 'Craft Plugins'. This means you must add an item to your composer.json to place it in a folder of your choice. This will only affect users who use Craft CMS. And as this is a package designed for a Twig project or [Timber for Wordpress](https://github.com/jarednova/timber), that shouldn't be a problem... right?

# Requirements
* [Timber for Wordpress](https://github.com/jarednova/timber) or other Twig project
* SCSS

# Install
In your `composer.json`, add a new section for repositories:

```
"repositories": [
  { "type": "vcs", "url": "GIT-URL" }
]
```

And add the url of this repository.

Then include it in your composer:

```
"require": {
  "wearebase/web-front-end-images" : "*"
}
```

And specify a version or minimum version.

As this repo is private on BitBucket, your development machine *and* your servers will need authorised keys on bitbucket to pull this repo.

# Configure where you want the package to go
In your `composer.json`, add the following:

```
"extra": {
  "installer-paths": {
    "wp-content/themes/timber/packages/{$name}": ["type:craft-plugin"]
  }
}
```

This plugin identifies itself as a `craft-plugin`. The addition above will send all `craft-plugin` to a directory you specify. I recommend to send it to your src directory in a third-party folder you can easily access with Sass, Twig, etc. If using Wordpress, send it to a theme/third-party directory and gitignore that folder.

If you do not specify this item in `composer.json` this utility will install to `craft/plugins/{$name}` as that is the default from `composer/installer` package.

# What's included

* [blazy](http://dinbror.dk/blog/blazy/), created by <NAME> with an MIT License.
    * [Docs here](http://dinbror.dk/blog/blazy/).
    * (These files are held in this repo for simplicity as bLazy is not available on Composer and pulling it from npm or Bower is an added dependency.)
    * I have also included a copy of the documentation as it is held on a private website which may be unavailable.
* lazyLoad markup and scss to allow for full size backgrounds, images, and TimberImages
* background-size.min.htc to allow for backwards compatibility of `background-size: cover;`

# Enabling

## Enabling Views
First of all, you must add the views folder to your Twig template load path. You can either specify the views folder within this package or specify your whole third-party directory, which will affect the way you access your views. If you're using multiple Base packages, then the latter may be preferable.

### Timber
[Add the loadpath to your `functions.php`](https://github.com/jarednova/timber/wiki/Configure-template-locations#changing-the-default-folder-for-twig-files). You must re-add the default Theme view folder in here too as it may override the Timber view folder.

```
Timber::$dirname = array(
  'views',
  'packages/web-front-end-images/views'
);
```

### Enabling Macros<commit_msg>README.md edited online with Bitbucket<commit_after># Important note for Craft CMS users
Because Composer doesn't let you install to a folder of your choice, at the current time we are hijacking the [composer/installers](https://github.com/composer/installers) package for 'Craft Plugins'. This means you must add an item to your composer.json to place it in a folder of your choice. This will only affect users who use Craft CMS. And as this is a package designed for a Twig project or [Timber for Wordpress](https://github.com/jarednova/timber), that shouldn't be a problem... right?

# Requirements
* [Timber for Wordpress](https://github.com/jarednova/timber) or other Twig project
* SCSS


# Install
In your `composer.json`, add a new section for repositories:

```
"repositories": [
  { "type": "vcs", "url": "GIT-URL" }
]
```

And add the url of this repository.

Then include it in your composer:

```
"require": {
  "wearebase/web-front-end-images" : "*"
}
```

And specify a version or minimum version.

# Configure where you want the package to go
In your `composer.json`, add the following:

```
"extra": {
  "installer-paths": {
    "wp-content/themes/timber/packages/{$name}": ["type:craft-plugin"]
  }
}
```

This plugin identifies itself as a `craft-plugin`. The addition above will send all `craft-plugin` to a directory you specify. I recommend to send it to your Timber theme inside of wp-content, so you can easily access files with Sass, Twig, etc. Then .gitignore that packages folder.

If you do not specify this item in `composer.json` this utility will install to `craft/plugins/{$name}` as that is the default from `composer/installer` package.

# What's included

* [blazy](http://dinbror.dk/blog/blazy/), created by <NAME> with an MIT License.
    * [Docs here](http://dinbror.dk/blog/blazy/).
    * (These files are held in this repo for simplicity as bLazy is not available on Composer and pulling it from npm or Bower is an added dependency.)
    * I have also included a copy of the documentation as it is held on a private website which may be unavailable.
* lazyLoad markup and scss to allow for full size backgrounds, images, and TimberImages
* background-size.min.htc to allow for backwards compatibility of `background-size: cover;`

# Usage

## Enabling Views
First of all, you must add the views folder to your Twig template load path. You can either specify the views folder within this package or specify your whole third-party directory, which will affect the way you access your views. If you're using multiple Base packages, then the latter may be preferable.

### Timber
[Add the loadpath to your `functions.php`](https://github.com/jarednova/timber/wiki/Configure-template-locations#changing-the-default-folder-for-twig-files). You must re-add the default Theme view folder in here too as it may override the Timber view folder.

```
Timber::$dirname = array(
  'views',
  'packages/web-front-end-images/views'
);
```

### Enabling Macros
{'fraction_non_alphanumeric': 0.09624796084828711, 'fraction_numerical': 0.0, 'mean_word_length': 4.23122866894198, 'pattern_counts': {'":': 14, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5156633', 'n_tokens_mistral': 1790, 'n_tokens_neox': 1731, 'n_words': 799}