Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Installation via composer.json vs "composer create-project"


Reply


4 Posts   936 Views

Avatar
elementz

Community Member, 2 Posts

5 January 2014 at 4:23am

Edited: 05/01/2014 4:27am

I am having trouble setting up silverstripe via a package definition provided via package.json.

When installing via composer create-project silverstripe/installer ./my/website/folder (as outlined in the [url=http://doc.silverstripe.org/framework/en/installation/composer]doc[/url]) the subdirectory ./mysite including the _config.php gets created, whereas when installing via composer install using the package definition, the ./mysite folder won't get created.

I have tried including silverstripe/installer in the package defintion but that does not resolve the issue.

Here's my current package.json:

{
"name": "silverstripe/installer",
"description": "The SilverStripe Framework Installer",
"require": {
"silverstripe/installer":"@dev",
"silverstripe/cms": "3.1.0",
"silverstripe/framework": "3.1.0",
"silverstripe-themes/simple": "*",
"stage1/docker-php": "@dev"

},
"require-dev": {
"silverstripe/compass": "*",
"silverstripe/docsviewer": "*",
},
"minimum-stability": "dev"
}

Maybe someone could help me understand when and how to use which installation method (i.e. package.json vs composer create-project).

Avatar
Ingo

Forum Moderator, 801 Posts

4 February 2014 at 10:12am

Are you sure you want a package.json file? That's only used to describe a package in its entirety, including all version data. Usually that's provided by packagist.org, you don't need one yourself. You should create your own composer.json in the root of your project, and can use the silverstripe/installer one as a starting point: http://doc.silverstripe.org/framework/en/installation/composer#manually-editing-composer-json

Avatar
elementz

Community Member, 2 Posts

4 February 2014 at 10:44am

Ingo, thank you for replying.
Where I said package.json I actually meant composer.json. Sorry for the mixup.
My quesion still stands though. :)

Avatar
Ingo

Forum Moderator, 801 Posts

4 February 2014 at 11:39am

Can you please post your composer.json (or put it on gist.github.com)?