Skip to content

Commit

Permalink
Migrate to the zodiacmedia namespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
codebymikey committed Jul 13, 2020
1 parent b66489e commit 8f14ae8
Show file tree
Hide file tree
Showing 29 changed files with 1,126 additions and 173 deletions.
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# libraries lock file
/installed-libraries.json
# ide folders
/.idea
# composer artifacts
/vendor/
/.phpunit.result.cache
/composer.lock
/composer.phar
/phpunit.xml
/reports
/vendor
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
1.2.0 / 2020-07-14
========================

* Quality of life improvements such as an alternative configuration
definition for supporting:
* Different file extensions.
* SHA1 checksum verification.
* Removing example/demo/test files from the libraries (see [PSA-2011-002](https://www.drupal.org/node/1189632)).
* Ability to pull in library dependencies declared in subpackages through the
`drupal-libraries-dependencies` extra option.
* Basic unit tests.

1.0.1 / 2018-01-25
========================
* Relax composer-installers version requirement.

1.0.0 / 2018-01-25
========================
* Initial MVP plugin.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ external dependencies for a Drupal site in a single place: the `composer.json` f
1. Add _Drupal Libraries Installer_ to your Drupal site project:

```sh
composer require balbuf/drupal-libraries-installer
composer require zodiacmedia/drupal-libraries-installer
```

1. Add libraries to your `composer.json` file via the `drupal-libraries` property
Expand Down
33 changes: 28 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,48 @@
{
"name": "balbuf/drupal-libraries-installer",
"name": "zodiacmedia/drupal-libraries-installer",
"description": "Install Drupal libraries via a simple listing in your composer.json file",
"type": "composer-plugin",
"license": "MIT",
"authors": [
{
"name": "Stephen Beemsterboer",
"homepage": "https://github.com/balbuf"
},
{
"name": "codebymikey",
"homepage": "https://www.drupal.org/u/codebymikey"
}
],
"support": {
"issues": "https://github.com/balbuf/drupal-libraries-installer/issues"
"issues": "https://github.com/zodiacmedia/drupal-libraries-installer/issues"
},
"autoload": {
"psr-4": {"BalBuf\\DrupalLibrariesInstaller\\": "src/"}
"psr-4": {
"Zodiacmedia\\DrupalLibrariesInstaller\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Zodiacmedia\\DrupalLibrariesInstaller\\": "tests"
}
},
"extra": {
"class": "BalBuf\\DrupalLibrariesInstaller\\Plugin"
"class": "Zodiacmedia\\DrupalLibrariesInstaller\\Plugin"
},
"scripts": {
"phpunit": "phpunit",
"coverage": "phpunit --coverage-text",
"coverage:report": "phpunit --log-junit=reports/unitreport.xml --coverage-text --coverage-html=reports/coverage --coverage-clover=reports/coverage.xml"
},
"require": {
"composer-plugin-api": "^1.0",
"composer/installers": "^1.1"
"composer/installers": "^1.1",
"php": ">=7.2.0"
},
"require-dev": {
"composer/composer": "^1.10",
"mikey179/vfsstream": "^1.6",
"phpunit/phpunit": "^8.5",
"ext-json": "*"
}
}
138 changes: 0 additions & 138 deletions composer.lock

This file was deleted.

5 changes: 5 additions & 0 deletions example/dependency/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Demo dependency package.

Demo dependency package includes a `moment` library version 2.0.0 which will
not be installed because it was already declared in the root project's
composer.json.
17 changes: 17 additions & 0 deletions example/dependency/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "zodiacmedia/drupal-libraries-installer-demo-dependency",
"type": "project",
"license": "MIT",
"authors": [
{
"name": "codebymikey",
"homepage": "https://www.drupal.org/u/codebymikey"
}
],
"extra": {
"drupal-libraries": {
"dependency@flexslider": "https://github.com/woocommerce/FlexSlider/archive/2.6.4.zip",
"moment": "https://registry.npmjs.org/moment/-/moment-2.0.0.tgz"
}
}
}
3 changes: 3 additions & 0 deletions example/project/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/composer.lock
/vendor
/web
3 changes: 3 additions & 0 deletions example/project/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Demo root project

Demo root project integrating with Drupal libraries installer.
75 changes: 75 additions & 0 deletions example/project/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"name": "zodiacmedia/drupal-libraries-installer-demo-project",
"description": "Demo project using the installer.",
"type": "project",
"license": "MIT",
"authors": [
{
"name": "codebymikey",
"homepage": "https://www.drupal.org/u/codebymikey"
}
],
"repositories": {
"drupal-libraries-installer": {
"type": "vcs",
"url": "../.."
},
"drupal-libraries-installer-demo-dependency": {
"type": "path",
"url": "../dependency/",
"options": {
"symlink": true
}
}
},
"require": {
"zodiacmedia/drupal-libraries-installer": "*@dev",
"zodiacmedia/drupal-libraries-installer-demo-dependency": "*@dev"
},
"config": {
"preferred-install": "source",
"classmap-authoritative": true,
"prepend-autoloader": false,
"optimize-autoloader": true
},
"extra": {
"installer-paths": {
"web/libraries/{$name}/": [
"type:drupal-library"
]
},
"drupal-libraries-dependencies": [
"zodiacmedia/drupal-libraries-installer-demo-dependency"
],
"drupal-libraries": {
"simple-color": "https://github.com/recurser/jquery-simple-color/archive/v1.2.2.zip",
"chosen": {
"url": "https://github.com/harvesthq/chosen/releases/download/v1.8.2/chosen_v1.8.2.zip",
"version": "1.8.2"
},
"flexslider": {
"url": "https://github.com/woocommerce/FlexSlider/archive/2.6.4.zip",
"version": "2.6.4",
"type": "zip",
"ignore": [
"bower_components",
"demo",
"node_modules"
]
},
"moment": {
"url": "https://registry.npmjs.org/moment/-/moment-2.25.0.tgz",
"shasum": "e961ab9a5848a1cf2c52b1af4e6c82a8401e7fe9"
},
"select2": {
"url": "https://github.com/select2/select2/archive/4.0.13.zip",
"ignore": [
".*",
"*.{md}",
"Gruntfile.js",
"{docs,src,tests}"
]
}
}
}
}
15 changes: 15 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<phpunit colors="true"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutChangesToGlobalState="true">
<testsuites>
<testsuite name="Tests">
<directory>./tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
</phpunit>
Loading

0 comments on commit 8f14ae8

Please sign in to comment.