mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
NEW Convert to vendor module
This commit is contained in:
parent
0ebf9509bf
commit
95a71566f1
@ -31,14 +31,11 @@ before_script:
|
|||||||
- phpenv config-rm xdebug.ini
|
- phpenv config-rm xdebug.ini
|
||||||
- echo 'memory_limit = 2G' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
- echo 'memory_limit = 2G' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
||||||
- composer validate
|
- composer validate
|
||||||
- composer require silverstripe/recipe-cms 1.0.x-dev --no-update
|
- composer require silverstripe/installer 4.0.x-dev --no-update
|
||||||
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:2.0.x-dev; fi
|
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:2.0.x-dev; fi
|
||||||
- composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
|
- composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
|
||||||
- echo "SS_BASE_URL=http://localhost:8080/" >> .env
|
- echo "SS_BASE_URL=http://localhost:8080/" >> .env
|
||||||
|
|
||||||
# Bootstrap cms / mysite folder
|
|
||||||
- php ./vendor/silverstripe/cms/tests/bootstrap/mysite.php
|
|
||||||
|
|
||||||
# Behat bootstrapping
|
# Behat bootstrapping
|
||||||
- if [[ $BEHAT_TEST ]]; then echo "" >> .env && echo "SS_BASE_URL=http://localhost:8080/" >> .env; fi
|
- if [[ $BEHAT_TEST ]]; then echo "" >> .env && echo "SS_BASE_URL=http://localhost:8080/" >> .env; fi
|
||||||
- if [[ $BEHAT_TEST ]]; then mkdir artifacts; fi
|
- if [[ $BEHAT_TEST ]]; then mkdir artifacts; fi
|
||||||
@ -50,7 +47,7 @@ before_script:
|
|||||||
script:
|
script:
|
||||||
- if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit; fi
|
- if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit; fi
|
||||||
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi
|
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi
|
||||||
- if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs --standard=vendor/silverstripe/framework/phpcs.xml.dist src/ tests/ ; fi
|
- if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs --standard=vendor/silverstripe/framework/phpcs.xml.dist src tests *.php ; fi
|
||||||
- if [[ $BEHAT_TEST ]]; then vendor/bin/behat @subsites; fi
|
- if [[ $BEHAT_TEST ]]; then vendor/bin/behat @subsites; fi
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"name": "silverstripe/subsites",
|
"name": "silverstripe/subsites",
|
||||||
"description": "Run multiple sites from a single SilverStripe install.",
|
"description": "Run multiple sites from a single SilverStripe install.",
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"type": "silverstripe-module",
|
"type": "silverstripe-vendormodule",
|
||||||
"keywords": ["silverstripe", "subsites", "multisite"],
|
"keywords": ["silverstripe", "subsites", "multisite"],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
@ -34,7 +34,11 @@
|
|||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "2.0.x-dev"
|
"dev-master": "2.0.x-dev"
|
||||||
}
|
},
|
||||||
|
"expose": [
|
||||||
|
"javascript",
|
||||||
|
"css"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"minimum-stability": "dev",
|
"minimum-stability": "dev",
|
||||||
"prefer-stable": true
|
"prefer-stable": true
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<phpunit bootstrap="vendor/silverstripe/framework/tests/bootstrap.php" colors="true">
|
<phpunit bootstrap="vendor/silverstripe/cms/tests/bootstrap.php" colors="true">
|
||||||
<testsuite name="Default">
|
<testsuite name="Default">
|
||||||
<directory>tests/php</directory>
|
<directory>tests/php</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
|
@ -10,7 +10,6 @@ use SilverStripe\CMS\Controllers\CMSPageEditController;
|
|||||||
use SilverStripe\Control\Controller;
|
use SilverStripe\Control\Controller;
|
||||||
use SilverStripe\Core\Config\Config;
|
use SilverStripe\Core\Config\Config;
|
||||||
use SilverStripe\Core\Convert;
|
use SilverStripe\Core\Convert;
|
||||||
use SilverStripe\Core\Manifest\ModuleLoader;
|
|
||||||
use SilverStripe\Forms\HiddenField;
|
use SilverStripe\Forms\HiddenField;
|
||||||
use SilverStripe\ORM\ArrayList;
|
use SilverStripe\ORM\ArrayList;
|
||||||
use SilverStripe\ORM\DataObject;
|
use SilverStripe\ORM\DataObject;
|
||||||
@ -41,11 +40,9 @@ class LeftAndMainSubsites extends LeftAndMainExtension
|
|||||||
|
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
$module = ModuleLoader::getModule('silverstripe/subsites');
|
Requirements::css('silverstripe/subsites:css/LeftAndMain_Subsites.css');
|
||||||
|
Requirements::javascript('silverstripe/subsites:javascript/LeftAndMain_Subsites.js');
|
||||||
Requirements::css($module->getRelativeResourcePath('css/LeftAndMain_Subsites.css'));
|
Requirements::javascript('silverstripe/subsites:javascript/VirtualPage_Subsites.js');
|
||||||
Requirements::javascript($module->getRelativeResourcePath('javascript/LeftAndMain_Subsites.js'));
|
|
||||||
Requirements::javascript($module->getRelativeResourcePath('javascript/VirtualPage_Subsites.js'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -152,8 +149,7 @@ class LeftAndMainSubsites extends LeftAndMainExtension
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$module = ModuleLoader::getModule('silverstripe/subsites');
|
Requirements::javascript('silverstripe/subsites:javascript/LeftAndMain_Subsites.js');
|
||||||
Requirements::javascript($module->getRelativeResourcePath('javascript/LeftAndMain_Subsites.js'));
|
|
||||||
|
|
||||||
$output = ArrayList::create();
|
$output = ArrayList::create();
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ namespace SilverStripe\Subsites\Forms;
|
|||||||
|
|
||||||
use SilverStripe\Control\Controller;
|
use SilverStripe\Control\Controller;
|
||||||
use SilverStripe\Control\HTTPRequest;
|
use SilverStripe\Control\HTTPRequest;
|
||||||
use SilverStripe\Core\Manifest\ModuleLoader;
|
|
||||||
use SilverStripe\Forms\TreeDropdownField;
|
use SilverStripe\Forms\TreeDropdownField;
|
||||||
use SilverStripe\View\Requirements;
|
use SilverStripe\View\Requirements;
|
||||||
use SilverStripe\Subsites\State\SubsiteState;
|
use SilverStripe\Subsites\State\SubsiteState;
|
||||||
@ -35,8 +34,7 @@ class SubsitesTreeDropdownField extends TreeDropdownField
|
|||||||
{
|
{
|
||||||
$html = parent::Field($properties);
|
$html = parent::Field($properties);
|
||||||
|
|
||||||
$module = ModuleLoader::getModule('silverstripe/subsites');
|
Requirements::javascript('silverstripe/subsitesjavascript/SubsitesTreeDropdownField.js');
|
||||||
Requirements::javascript($module->getRelativeResourcePath('javascript/SubsitesTreeDropdownField.js'));
|
|
||||||
|
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user