This repository was archived by the owner on Mar 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Add a remove frontend command #252
Open
loic425
wants to merge
5
commits into
monofony:master
Choose a base branch
from
loic425:feature/remove-frontend-command
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e5eed2d
Add a remove frontend command
loic425 5f6445e
Test Application without frontend on travis
loic425 1b41977
Add remove frontend part on readme
loic425 9dfcc9b
Improve readme decription for remove-frontend command
loic425 291d718
Use filesystem to copy content
loic425 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| #!/usr/bin/env php | ||
| <?php | ||
|
|
||
| use Symfony\Component\Filesystem\Filesystem; | ||
|
|
||
| require dirname(__DIR__).'/vendor/autoload.php'; | ||
|
|
||
| $filesystem = new Filesystem(); | ||
| $projectDir = dirname(__DIR__); | ||
|
|
||
| // Remove routes | ||
| $filesystem->remove($projectDir.'/config/routes/frontend'); | ||
|
|
||
| // redirect homepage to admin dashboard | ||
| $data = <<<EOM | ||
| app_frontend_homepage: | ||
| path: / | ||
| defaults: | ||
| _controller: FrameworkBundle:Redirect:redirect | ||
| route: app_backend_dashboard | ||
| EOM; | ||
|
|
||
| file_put_contents($projectDir.'/config/routes/frontend.yaml', $data); | ||
loic425 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| // Remote templates | ||
| $filesystem->remove($projectDir.'/templates/frontend'); | ||
|
|
||
| // Remove Behat features | ||
| $filesystem->remove($projectDir.'/features/account'); | ||
|
|
||
| // Remove assets | ||
| $filesystem->remove($projectDir.'/assets/frontend'); | ||
|
|
||
| $data = <<<EOM | ||
| var backendConfig = require('./assets/backend/webpack.config'); | ||
| module.exports = [backendConfig]; | ||
| EOM; | ||
|
|
||
| file_put_contents($projectDir.'/webpack.config.js', $data); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh" | ||
|
|
||
| print_header "Validating (DI Container)" "AppName" | ||
|
|
||
| run_command "bin/console lint:container" |
6 changes: 6 additions & 0 deletions
6
etc/travis/suites/application_without_frontend/before_install.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/common.lib.sh" | ||
|
|
||
| run_command "bin/remove-frontend" | ||
| run_command "etc/travis/suites/application/before_install.sh" |
5 changes: 5 additions & 0 deletions
5
etc/travis/suites/application_without_frontend/before_script.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/common.lib.sh" | ||
|
|
||
| run_command "etc/travis/suites/application/before_script.sh" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/common.lib.sh" | ||
|
|
||
| run_command "etc/travis/suites/application/install.sh" |
5 changes: 5 additions & 0 deletions
5
etc/travis/suites/application_without_frontend/is_suitable.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/common.lib.sh" | ||
|
|
||
| run_command "etc/travis/suites/application/is_suitable.sh" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/common.lib.sh" | ||
|
|
||
| run_command "etc/travis/suites/application/script.sh" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.