Skip to content

Commit 7269333

Browse files
committed
use Flex by default
1 parent c9efaf8 commit 7269333

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Command/DumpCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,12 @@ private function doDump(InputInterface $input, OutputInterface $output): void
112112
$serializer = $this->serializer;
113113
$targetPath = $input->getOption('target') ?:
114114
sprintf(
115-
'%s/web/js/fos_js_routes%s.%s',
115+
'%s/public/js/fos_js_routes%s.%s',
116116
$this->projectDir,
117117
empty($domain) ? '' : ('_' . implode('_', $domain)),
118118
$input->getOption('format')
119119
);
120-
120+
121121
if (!is_dir($dir = dirname($targetPath))) {
122122
$output->writeln('<info>[dir+]</info> ' . $dir);
123123
if (false === @mkdir($dir, 0777, true)) {

Resources/doc/usage.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ In applications not using webpack add these two lines in your layout:
2424

2525

2626
If you are using webpack and Encore to package your assets you will need to use the dump command
27-
and export your routes to json, this command will create a json file into the ``web/js`` folder:
27+
and export your routes to json, this command will create a json file into the ``public/js`` folder:
2828

2929
.. code-block:: bash
3030
3131
bin/console fos:js-routing:dump --format=json
3232
33-
If you are using Flex, probably you want to dump your routes into the ``public`` folder
34-
instead of ``web``, to achieve this you can set the ``target`` parameter:
33+
If you are not using Flex, probably you want to dump your routes into the ``web`` folder
34+
instead of ``public``, to achieve this you can set the ``target`` parameter:
3535

3636
.. code-block:: bash
3737
3838
# Symfony Flex
39-
bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
39+
bin/console fos:js-routing:dump --format=json --target=web/js/fos_js_routes.json
4040
4141
Then within your JavaScript development you can use:
4242

Tests/Command/DumpCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function testExecuteFormatOption()
9898
public function testExecuteUnableToCreateDirectory()
9999
{
100100
$this->expectException(\RuntimeException::class);
101-
$this->expectExceptionMessage('Unable to create directory /root/dir/web/js');
101+
$this->expectExceptionMessage('Unable to create directory /root/dir/public/js');
102102
$command = new DumpCommand($this->extractor, $this->serializer, '/root/dir');
103103

104104
$tester = new CommandTester($command);

0 commit comments

Comments
 (0)