mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Expose as vendor module
This commit is contained in:
parent
f37b78ef61
commit
6e5836680b
18
_config.php
18
_config.php
@ -7,28 +7,18 @@ use SilverStripe\CMS\Controllers\CMSPageEditController;
|
||||
use SilverStripe\CMS\Controllers\CMSPageHistoryController;
|
||||
use SilverStripe\CMS\Controllers\CMSPageSettingsController;
|
||||
use SilverStripe\CMS\Model\SiteTree;
|
||||
use SilverStripe\Core\Manifest\ModuleLoader;
|
||||
use SilverStripe\Forms\HTMLEditor\TinyMCEConfig;
|
||||
use SilverStripe\View\Parsers\ShortcodeParser;
|
||||
|
||||
/**
|
||||
* Define constants
|
||||
*
|
||||
* - CMS_DIR: Path relative to webroot, e.g. "cms"
|
||||
* - CMS_PATH: Absolute filepath, e.g. "/var/www/my-webroot/cms"
|
||||
*/
|
||||
call_user_func(function () {
|
||||
// Check if CMS is root dir, or subdir
|
||||
if (strcasecmp(__DIR__, BASE_PATH) === 0) {
|
||||
$clientPath = 'client';
|
||||
} else {
|
||||
$clientPath = basename(__DIR__) . '/client';
|
||||
}
|
||||
$module = ModuleLoader::inst()->getManifest()->getModule('silverstripe/cms');
|
||||
|
||||
// Enable insert-link to internal pages
|
||||
TinyMCEConfig::get('cms')
|
||||
->enablePlugins(array(
|
||||
'sslinkinternal' => "{$clientPath}/dist/js/TinyMCE_sslink-internal.js",
|
||||
'sslinkanchor' => "{$clientPath}/dist/js/TinyMCE_sslink-anchor.js",
|
||||
'sslinkinternal' => $module->getResource('client/dist/js/TinyMCE_sslink-internal.js')->getURL(),
|
||||
'sslinkanchor' => $module->getResource('client/dist/js/TinyMCE_sslink-anchor.js')->getURL()
|
||||
));
|
||||
});
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "silverstripe/cms",
|
||||
"type": "silverstripe-module",
|
||||
"type": "silverstripe-vendormodule",
|
||||
"description": "The SilverStripe Content Management System",
|
||||
"homepage": "http://silverstripe.org",
|
||||
"license": "BSD-3-Clause",
|
||||
@ -25,7 +25,8 @@
|
||||
"silverstripe/framework": "^4@dev",
|
||||
"silverstripe/reports": "^4@dev",
|
||||
"silverstripe/siteconfig": "^4@dev",
|
||||
"silverstripe/versioned": "^1@dev"
|
||||
"silverstripe/versioned": "^1@dev",
|
||||
"silverstripe/vendor-plugin": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^5.7",
|
||||
@ -37,7 +38,11 @@
|
||||
"branch-alias": {
|
||||
"4.x-dev": "4.0.x-dev",
|
||||
"dev-master": "5.x-dev"
|
||||
}
|
||||
},
|
||||
"expose": [
|
||||
"client/dist",
|
||||
"client/lang"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "phpcs -s code/ tests/php/ tests/behat/src/",
|
||||
|
Loading…
Reference in New Issue
Block a user