Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit c6365db

Browse files
committed
Merge pull request #636 from symfony-cmf/install-create
cleanup installation instructions
2 parents 9ab2c94 + bdedaf6 commit c6365db

File tree

5 files changed

+41
-13
lines changed

5 files changed

+41
-13
lines changed

book/installation.rst

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,17 @@ dependencies, use the ``install`` command:
9696
9797
$ composer install
9898
99+
To try out things, you can accept the default values for all questions you are
100+
asked about the parameters.yml. Revisit that file later when you know more
101+
about Jackalope.
102+
103+
Setup
104+
-----
105+
106+
You are almost there. A few more steps need to be done to be ready.
99107

100108
Set up the Database
101-
-------------------
109+
~~~~~~~~~~~~~~~~~~~
102110

103111
The next step is to set up the database. If you want to use SQLite as your
104112
database backend just go ahead and run the following:
@@ -115,7 +123,20 @@ folder, containing the database content. The two commands after it will setup
115123
PHPCR and the final command will load some fixtures, so you can access the
116124
Standard Edition using a web server.
117125

118-
The project should now be accessible on your web server. If you have PHP 5.4
126+
Preparing Assetic
127+
~~~~~~~~~~~~~~~~~
128+
129+
To use the frontend editing in ``prod`` environment, you need to tell Assetic
130+
to dump the assets to the filesystem:
131+
132+
.. code-block:: bash
133+
134+
$ php app/console --env=prod assetic:dump
135+
136+
Configure a Webserver
137+
~~~~~~~~~~~~~~~~~~~~~
138+
139+
The project is now ready to be served by your web server. If you have PHP 5.4
119140
installed you can alternatively use the PHP internal web server:
120141

121142
.. code-block:: bash
@@ -128,7 +149,6 @@ And then access the CMF via:
128149
129150
http://localhost:8000
130151
131-
132152
If you run an Apache installation as described in the `Symfony cookbook article on setup`_,
133153
your URL will look like this:
134154

bundles/block/create_your_own_blocks.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ that knows how to fetch the feed data of an ``RssBlock``::
136136
public function execute(BlockContextInterface $blockContext, Response $response = null)
137137
{
138138
$block = $blockContext->getBlock();
139-
139+
140140
if (!$block->getEnabled()) {
141141
return new Response();
142142
}
@@ -291,7 +291,7 @@ on the current page:
291291

292292
This mechanism is not recommended. For optimal load times, it is better
293293
to have a central assets definition for your project and aggregate them
294-
into a single Stylesheet and a single JavaScript file, e.g. with assetic_,
294+
into a single Stylesheet and a single JavaScript file, e.g. with Assetic_,
295295
rather than having individual ``<link>`` and ``<script>`` tags for each
296296
single file.
297297

@@ -341,4 +341,4 @@ handles, as per the ``getType`` method of the block. The second argument is the
341341
->addTag('sonata.block')
342342
;
343343
344-
.. _assetic: http://symfony.com/doc/current/cookbook/assetic/asset_management.html
344+
.. _Assetic: http://symfony.com/doc/current/cookbook/assetic/asset_management.html

bundles/create/developing-hallo.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ To use this template, specify ``hallo-coffee`` as editor in the
3434
))
3535
) ?>
3636
37-
The hallo-coffee template uses assetic to load the coffee script files from
37+
The hallo-coffee template uses Assetic to load the coffee script files from
3838
``Resources/public/vendor/hallo/src``, rather than the precompiled JavaScript
3939
from ``Resources/public/vendor/create/deps/hallo-min.js``. This also means
40-
that you need to add a mapping for coffeescript in your assetic configuration
40+
that you need to add a mapping for coffeescript in your Assetic configuration
4141
and you need the `coffee compiler set up correctly`_.
4242

4343
.. configuration-block::

bundles/create/introduction.rst

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ You also need to configure the FOSRestBundle to handle json:
194194
));
195195
196196
If you want to use Assetic to combine the CSS and JavaScript used for
197-
create.js, you need to enable the CreateBundle in the assetic configuration.
198-
Find the configuration for ``assetic.bundles``. If it is not present, assetic
197+
create.js, you need to enable the CreateBundle in the Assetic configuration.
198+
Find the configuration for ``assetic.bundles``. If it is not present, Assetic
199199
automatically scans all bundles for assets and you don't need to do anything.
200200
If you limit the bundles, you need to add ``CmfCreateBundle`` to the list of
201201
bundles.
@@ -227,6 +227,14 @@ bundles.
227227
),
228228
));
229229
230+
If you were not using Assetic previously, you need to call the ``assetic:dump``
231+
command in your deployment process, or the Javascript and CSS files will not be
232+
found:
233+
234+
.. code-block:: bash
235+
236+
$ php app/console --env=prod assetic:dump
237+
230238
Routing
231239
~~~~~~~
232240

@@ -256,7 +264,7 @@ routing configuration to enable the REST end point for saving content:
256264
$collection->addCollection($loader->import("@CmfCreateBundle/Resources/config/routing/rest.xml"));
257265
258266
return $collection;
259-
267+
260268
.. tip::
261269

262270
If you don't want these routes to be prefixed by the current locale, you can
@@ -350,7 +358,7 @@ after those to be able to customize as needed) with:
350358
351359
.. caution::
352360

353-
Make sure assetic is rewriting the paths in your CSS files properly or you
361+
Make sure Assetic is rewriting the paths in your CSS files properly or you
354362
might not see icon images.
355363

356364
In your page bottom area, load the JavaScript files. If you are using Symfony 2.2 or

cookbook/editions/cmf_sandbox.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ The sandbox should now be accessible on your web server.
158158
http://localhost/app_dev.php
159159
160160
In order to run the sandbox in production mode you need to generate the
161-
doctrine proxies and dump the assetic assets:
161+
doctrine proxies and dump the Assetic assets:
162162

163163
.. code-block:: text
164164

0 commit comments

Comments
 (0)