Skip to content

Commit

Permalink
Allow for flexible module location using vendor-expose (#28)
Browse files Browse the repository at this point in the history
Creating version 2.0.1
  • Loading branch information
tamelion authored and timhiggs committed Jul 16, 2018
1 parent 87f88ef commit d532b47
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
3 changes: 0 additions & 3 deletions _config.php

This file was deleted.

2 changes: 1 addition & 1 deletion code/ResponsiveImageExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function __call($method, $args)
*/
protected function createResponsiveSet($config, $defaultArgs, $set)
{
Requirements::javascript(RESPONSIVE_IMAGES_DIR . '/javascript/picturefill/picturefill.min.js');
Requirements::javascript('heyday/silverstripe-responsive-images:javascript/picturefill/picturefill.min.js');

if (!isset($config['arguments']) || !is_array($config['arguments'])) {
throw new Exception("Responsive set $set does not have any arguments defined in its config.");
Expand Down
13 changes: 12 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,20 @@
"name": "heyday/silverstripe-responsive-images",
"description": "Configure and send a series of image size options to the client without loading any resources until a media query can be executed.",
"keywords": ["silverstripe", "responsive", "image", "picturefill"],
"type": "silverstripe-module",
"type": "silverstripe-vendormodule",
"license": "MIT",
"require": {
"silverstripe/vendor-plugin": "^1.0",
"silverstripe/framework": "^4.0"
},
"extra": {
"expose": [
"javascript"
]
},
"autoload": {
"psr-4": {
"Heyday\\ResponsiveImages\\": "code/"
}
}
}

0 comments on commit d532b47

Please sign in to comment.