Relocate to workbench so that dev dependencies are loaded properly.

This commit is contained in:
Toby Zerner 2014-12-23 22:59:15 +10:30
parent a33fad0ba0
commit 69b732b894
4 changed files with 45 additions and 48 deletions

View File

@ -68,13 +68,14 @@ Currently Flarum is in its very early stages, and it isn’t pretty. **It is far
1. Make sure you have [Composer](http://getcomposer.org), [ember-cli](http://www.ember-cli.com), and [Bower](http://bower.io) installed globally. 1. Make sure you have [Composer](http://getcomposer.org), [ember-cli](http://www.ember-cli.com), and [Bower](http://bower.io) installed globally.
2. Create a new [Laravel 4](http://laravel.com/docs/4.2/quick) project. 2. Create a new [Laravel 4](http://laravel.com/docs/4.2/quick) project.
3. Open up `composer.json` and change `minimum-stability` to `dev`. 3. Clone the Flarum repository into the workbench and install dependencies:
4. Run the following commands in your project directory:
``` ```
composer require flarum/core git clone https://github.com/flarum/core.git workbench/flarum/core
cd vendor/flarum/core cd workbench/flarum/core
composer install composer install
cd ../../..
php artisan dump-autoload
``` ```
5. Create a new MySQL database and configure your database details in `app/config/database.php`. 5. Create a new MySQL database and configure your database details in `app/config/database.php`.

View File

@ -28,10 +28,5 @@
"Flarum\\Web\\": "src/Flarum/Web" "Flarum\\Web\\": "src/Flarum/Web"
} }
}, },
"scripts": {
"post-install-cmd": [
"php artisan config:publish flarum/core"
]
},
"minimum-stability": "dev" "minimum-stability": "dev"
} }

View File

@ -4,7 +4,7 @@
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"hash": "033344b8fc3e42d26e0e4fc322eaea47", "hash": "8625c653b9f1cea84c409f2da632a32a",
"packages": [ "packages": [
{ {
"name": "illuminate/container", "name": "illuminate/container",
@ -54,12 +54,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/illuminate/database.git", "url": "https://github.com/illuminate/database.git",
"reference": "a0d40d0df4f7d6313fc8d142d7ba54568ea00ef1" "reference": "5d07587a51b13224cdda6417fbc25e9c13d276c9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/illuminate/database/zipball/a0d40d0df4f7d6313fc8d142d7ba54568ea00ef1", "url": "https://api.github.com/repos/illuminate/database/zipball/5d07587a51b13224cdda6417fbc25e9c13d276c9",
"reference": "a0d40d0df4f7d6313fc8d142d7ba54568ea00ef1", "reference": "5d07587a51b13224cdda6417fbc25e9c13d276c9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -102,7 +102,7 @@
"orm", "orm",
"sql" "sql"
], ],
"time": "2014-12-19 14:56:13" "time": "2014-12-22 20:55:49"
}, },
{ {
"name": "illuminate/events", "name": "illuminate/events",
@ -359,12 +359,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Codeception/Codeception.git", "url": "https://github.com/Codeception/Codeception.git",
"reference": "0094191ac0d6e87821fba41de002103ebe79a279" "reference": "24e6927a1ae17a432e7acbd6048d1e4898bab6ae"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Codeception/Codeception/zipball/0094191ac0d6e87821fba41de002103ebe79a279", "url": "https://api.github.com/repos/Codeception/Codeception/zipball/24e6927a1ae17a432e7acbd6048d1e4898bab6ae",
"reference": "0094191ac0d6e87821fba41de002103ebe79a279", "reference": "24e6927a1ae17a432e7acbd6048d1e4898bab6ae",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -433,7 +433,7 @@
"functional testing", "functional testing",
"unit testing" "unit testing"
], ],
"time": "2014-12-19 23:54:20" "time": "2014-12-23 02:04:40"
}, },
{ {
"name": "doctrine/instantiator", "name": "doctrine/instantiator",
@ -1097,12 +1097,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "a26a348a8686a8f523c53ed2683d65b3d36956bd" "reference": "2a1f8746a5bc0ff5d0cd24b356123fcf0fd1fb64"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a26a348a8686a8f523c53ed2683d65b3d36956bd", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2a1f8746a5bc0ff5d0cd24b356123fcf0fd1fb64",
"reference": "a26a348a8686a8f523c53ed2683d65b3d36956bd", "reference": "2a1f8746a5bc0ff5d0cd24b356123fcf0fd1fb64",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1161,7 +1161,7 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2014-12-19 06:27:31" "time": "2014-12-22 16:18:11"
}, },
{ {
"name": "phpunit/phpunit-mock-objects", "name": "phpunit/phpunit-mock-objects",
@ -1641,12 +1641,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Console.git", "url": "https://github.com/symfony/Console.git",
"reference": "d928858fe39e94f6eaf660927ea080d5a15c5fac" "reference": "77966eddd2982c312e53a768b9e0eec210698081"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Console/zipball/d928858fe39e94f6eaf660927ea080d5a15c5fac", "url": "https://api.github.com/repos/symfony/Console/zipball/77966eddd2982c312e53a768b9e0eec210698081",
"reference": "d928858fe39e94f6eaf660927ea080d5a15c5fac", "reference": "77966eddd2982c312e53a768b9e0eec210698081",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1689,7 +1689,7 @@
], ],
"description": "Symfony Console Component", "description": "Symfony Console Component",
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2014-12-21 13:13:21" "time": "2014-12-23 11:23:33"
}, },
{ {
"name": "symfony/css-selector", "name": "symfony/css-selector",
@ -1698,12 +1698,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/CssSelector.git", "url": "https://github.com/symfony/CssSelector.git",
"reference": "0322b886af1a4ed88981f7e290a3fd857c08553d" "reference": "b03a0c013b30dc28bed02f7f2cb19298e915061f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/CssSelector/zipball/0322b886af1a4ed88981f7e290a3fd857c08553d", "url": "https://api.github.com/repos/symfony/CssSelector/zipball/b03a0c013b30dc28bed02f7f2cb19298e915061f",
"reference": "0322b886af1a4ed88981f7e290a3fd857c08553d", "reference": "b03a0c013b30dc28bed02f7f2cb19298e915061f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1740,7 +1740,7 @@
], ],
"description": "Symfony CssSelector Component", "description": "Symfony CssSelector Component",
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2014-12-08 08:43:57" "time": "2014-12-22 16:45:18"
}, },
{ {
"name": "symfony/dom-crawler", "name": "symfony/dom-crawler",
@ -1749,12 +1749,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/DomCrawler.git", "url": "https://github.com/symfony/DomCrawler.git",
"reference": "602468f00d1b2fffb1342bd88f6da585a073b7d6" "reference": "3a04196caa24c1be9cb4f79aecf961f8c6aad1e7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/DomCrawler/zipball/602468f00d1b2fffb1342bd88f6da585a073b7d6", "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/3a04196caa24c1be9cb4f79aecf961f8c6aad1e7",
"reference": "602468f00d1b2fffb1342bd88f6da585a073b7d6", "reference": "3a04196caa24c1be9cb4f79aecf961f8c6aad1e7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1793,7 +1793,7 @@
], ],
"description": "Symfony DomCrawler Component", "description": "Symfony DomCrawler Component",
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2014-12-16 20:28:45" "time": "2014-12-22 16:45:18"
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
@ -1802,12 +1802,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/EventDispatcher.git", "url": "https://github.com/symfony/EventDispatcher.git",
"reference": "24f2c9ea9353cbb25dc40786272f0b4f42ba3d3c" "reference": "b27ae60d9bf9b4768b3a6f155a4309f2cd991845"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/24f2c9ea9353cbb25dc40786272f0b4f42ba3d3c", "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/b27ae60d9bf9b4768b3a6f155a4309f2cd991845",
"reference": "24f2c9ea9353cbb25dc40786272f0b4f42ba3d3c", "reference": "b27ae60d9bf9b4768b3a6f155a4309f2cd991845",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1851,7 +1851,7 @@
], ],
"description": "Symfony EventDispatcher Component", "description": "Symfony EventDispatcher Component",
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2014-12-16 20:28:45" "time": "2014-12-22 16:45:18"
}, },
{ {
"name": "symfony/finder", "name": "symfony/finder",
@ -1860,12 +1860,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Finder.git", "url": "https://github.com/symfony/Finder.git",
"reference": "5f69e63177e3cb369040f3facbb21bb87da114bc" "reference": "3163e335375f3433569996fd68c89887e4a82d29"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Finder/zipball/5f69e63177e3cb369040f3facbb21bb87da114bc", "url": "https://api.github.com/repos/symfony/Finder/zipball/3163e335375f3433569996fd68c89887e4a82d29",
"reference": "5f69e63177e3cb369040f3facbb21bb87da114bc", "reference": "3163e335375f3433569996fd68c89887e4a82d29",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1898,7 +1898,7 @@
], ],
"description": "Symfony Finder Component", "description": "Symfony Finder Component",
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2014-12-12 16:23:01" "time": "2014-12-22 16:45:18"
}, },
{ {
"name": "symfony/yaml", "name": "symfony/yaml",
@ -1907,12 +1907,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Yaml.git", "url": "https://github.com/symfony/Yaml.git",
"reference": "b9c19ce1bd9a51d3f42665973088f2e2b82db240" "reference": "4acdf4ff8dedd856ee5fd1e4e0e16f7f42dca463"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Yaml/zipball/b9c19ce1bd9a51d3f42665973088f2e2b82db240", "url": "https://api.github.com/repos/symfony/Yaml/zipball/4acdf4ff8dedd856ee5fd1e4e0e16f7f42dca463",
"reference": "b9c19ce1bd9a51d3f42665973088f2e2b82db240", "reference": "4acdf4ff8dedd856ee5fd1e4e0e16f7f42dca463",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1945,7 +1945,7 @@
], ],
"description": "Symfony Yaml Component", "description": "Symfony Yaml Component",
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2014-12-09 17:32:32" "time": "2014-12-22 16:45:18"
} }
], ],
"aliases": [], "aliases": [],
@ -1955,6 +1955,7 @@
"tobscure/permissible": 20 "tobscure/permissible": 20
}, },
"prefer-stable": false, "prefer-stable": false,
"prefer-lowest": false,
"platform": { "platform": {
"php": ">=5.4.0" "php": ">=5.4.0"
}, },

View File

@ -35,7 +35,7 @@ class WebServiceProvider extends ServiceProvider {
// publish assets in dev environment // publish assets in dev environment
$publisher = new AssetPublisher($this->app['files'], $this->app['path.public']); $publisher = new AssetPublisher($this->app['files'], $this->app['path.public']);
$publisher->setPackagePath(base_path().'/vendor'); $publisher->setPackagePath(base_path().'/'.(strpos($this->guessPackagePath(), 'workbench') === false ? 'vendor' : 'workbench'));
$publisher->publishPackage('flarum/core'); $publisher->publishPackage('flarum/core');
include __DIR__.'/../../routes.php'; include __DIR__.'/../../routes.php';