diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..c234e62 --- /dev/null +++ b/composer.json @@ -0,0 +1,11 @@ +{ + "require": { + "heykarthikwithu/cycle": "1.1" + }, + "repositories": [ + { + "url": "https://github.com/heykarthikwithu/cycle.git", + "type": "git" + } + ] +} diff --git a/imagefield_slideshow.install b/imagefield_slideshow.install index 95d76a4..7fadc4b 100644 --- a/imagefield_slideshow.install +++ b/imagefield_slideshow.install @@ -13,7 +13,8 @@ function imagefield_slideshow_requirements($phase) { if ($phase == 'install') { // Check if library installed on module install. - if (!file_exists(DRUPAL_ROOT . '/libraries/jquery.cycle/jquery.cycle.all.js')) { + $file_path = drupal_get_path("module", "imagefield_slideshow") . '/vendor/heykarthikwithu/cycle/jquery.cycle.all.js'; + if (!file_exists($file_path)) { $error_description = 'Install jquery.cycle library'; $error_description .= " \n Follow instructions on https://www.drupal.org/project/imagefield_slideshow module page."; $error_description .= " \n Check 'Installation' section on the drupal.orgs module page."; @@ -26,4 +27,4 @@ function imagefield_slideshow_requirements($phase) { } return $requirements; -} \ No newline at end of file +} diff --git a/imagefield_slideshow.libraries.yml b/imagefield_slideshow.libraries.yml index e82a445..dc0f0fe 100644 --- a/imagefield_slideshow.libraries.yml +++ b/imagefield_slideshow.libraries.yml @@ -2,4 +2,4 @@ imagefield_slideshow: version: 1.x js: js/imagefield_slideshow.js: {} - /libraries/jquery.cycle/jquery.cycle.all.js: {} + vendor/heykarthikwithu/cycle/jquery.cycle.all.js: {}