-
-
Save h3llr4iser/4b3792f2a2e48e299a44f5e2a41bc855 to your computer and use it in GitHub Desktop.
This file contains 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
import App from './components/App.vue'; | |
import Vue from 'vue'; | |
new Vue({ | |
el: '#app', | |
render: h => h(App) | |
}); |
This file contains 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
<template> | |
<div id="app"> | |
{{ message }} | |
</div> | |
</template> | |
<script> | |
export default { | |
data() { | |
return { | |
message: 'Hello World' | |
} | |
} | |
} | |
</script> |
This file contains 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
<?php | |
namespace App\Controller; | |
use Symfony\Component\HttpFoundation\Response; | |
use Symfony\Component\Routing\Annotation\Route; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
class DefaultController extends Controller | |
{ | |
/** | |
* @Route("/") | |
*/ | |
public function home() | |
{ | |
return $this->render('home.html.twig'); | |
} | |
} |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>{% block title %}Welcome!{% endblock %}</title> | |
{% block stylesheets %}{% endblock %} | |
</head> | |
<body> | |
{% block body %} | |
<div id="app">SALUT</div> | |
{% endblock %} | |
{% block javascripts %} | |
{% endblock %} | |
</body> | |
</html> |
This file contains 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
your-project/ | |
├── assets/ | |
├── bin/ | |
│ └── console | |
├── config/ | |
│ ├── bundles.php | |
│ ├── packages/ | |
│ ├── routes.yaml | |
│ └── services.yaml | |
├── public/ | |
│ └── index.php | |
├── src/ | |
│ ├── ... | |
│ └── Kernel.php | |
├── templates/ | |
├── tests/ | |
├── translations/ | |
├── var/ | |
└── vendor/ |
This file contains 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
<script src="{{ asset('build/app.js') }}"></script> |
This file contains 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
var Encore = require('@symfony/webpack-encore'); | |
Encore | |
// the project directory where compiled assets will be stored | |
.setOutputPath('public/build/') | |
// the public path used by the web server to access the previous directory | |
.setPublicPath('/build') | |
.addEntry('app', './assets/js/app.js') | |
.cleanupOutputBeforeBuild() | |
.enableSourceMaps(!Encore.isProduction()) | |
.enableVueLoader() | |
; | |
module.exports = Encore.getWebpackConfig(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment