PHPackages                             concrete5/composer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. concrete5/composer

Abandoned → [concretecms/composer](/?search=concretecms%2Fcomposer)Project[Framework](/categories/framework)

concrete5/composer
==================

A fully featured skeleton for a composer managed Concrete site

v1.4.0(2y ago)3718.4k24[1 issues](https://github.com/concretecms/composer/issues)MITPHP

Since Dec 21Pushed 1y ago10 watchersCompare

[ Source](https://github.com/concretecms/composer)[ Packagist](https://packagist.org/packages/concrete5/composer)[ RSS](/packages/concrete5-composer/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (6)Versions (22)Used By (0)

Composer Based Skeleton for Concrete sites
==========================================

[](#composer-based-skeleton-for-concrete-sites)

[![Latest Version on Packagist](https://camo.githubusercontent.com/eed72e987b7fb84e67b464b41147729ccf30bc2d5c861f4bc7279866eedb0968/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f6e6372657465636d732f636f6d706f7365722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/concretecms/composer)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.txt)[![Build Status](https://camo.githubusercontent.com/07cbd2cce5c8371312868eaccc1246f405a7456e591fb7c62a77a75edcef1a5f/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636f6e6372657465636d732f636f6d706f7365722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/concretecms/composer)[![Total Downloads](https://camo.githubusercontent.com/edded2014d7faeec9ae1af598552dae7da227cae24d853697a8ccf04d2a47e62/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f6e6372657465636d732f636f6d706f7365722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/concretecms/composer)

Creating a new project
----------------------

[](#creating-a-new-project)

First choose a name for your project. In this example, our project is called "the\_oregon\_trail"

```
$ composer create-project -n concretecms/composer the_oregon_trail
```

Now you have the latest version of Concrete and you're ready to install!

Note: This is a skeleton project. So once you create a project, you can install your own VCS and change the README and all that.

Starting with the Concrete latest develop
-----------------------------------------

[](#starting-with-the-concrete-latest-develop)

First create a new project

```
$ composer create-project -n concretecms/composer the_oregon_trail
```

Then navigate into that project and require the `dev-develop` version of `concretecms/core`

```
$ cd the_oregon_trail
$ composer require concretecms/core:dev-develop
```

Installing Concrete
-------------------

[](#installing-concrete)

Navigate into your new Concrete project

```
$ cd the_oregon_trail
```

and use the interactive install commmand that comes with Concrete's CLI tool

```
$ ./vendor/bin/concrete c5:install -i
```

Follow directions and your site will begin installing!

Note: You can also run the CLI tool directly with PHP

```
$ ./public/concrete/bin/concrete
```

Install a Concrete package using composer
-----------------------------------------

[](#install-a-concrete-package-using-composer)

Find the package you'd like to install on [packagist.org](https://packagist.org) (in this case [`concretecms/sample_composer_package`](https://packagist.org/packages/concretecms/sample_composer_package))

Note: You can also use composer's repository functionality to manage private packages using composer

```
$ composer require concretecms/sample_composer_package
$ ./vendor/bin/concrete c5:package-install sample_composer_package
```

Compiling JS / CSS assets
-------------------------

[](#compiling-js--css-assets)

This library uses [Laravel Mix](https://laravel.com/docs/5.5/mix). See [webpack.mix.js](./webpack.mix.js). To build assets:

```
npm install
npm run dev   # Build for development
npm run hot   # Build with hot reloading enabled (See hot reloading section)
npm run watch # Build with a watcher that rebuilds when files change
npm run prod  # Build for production
```

### Hot Module Replacement

[](#hot-module-replacement)

Hot module replacement (hot reloading) allows you to write code and instantly see the changes in your browser, without reloading the page. In order to use hot reloading with Concrete, you'll want to use the `mix` and `mixAsset` helper functions to wrap your js and css urls. These functions make it so that your assets automatically detect hot reloading mode and output the appropriate urls, they are safe to use in production:

In a page theme:

```
