Skip to content

Commit 2f03317

Browse files
author
Niket Pathak
committed
project setup
0 parents  commit 2f03317

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+21349
-0
lines changed

.env.dist

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This file is a "template" of which env vars need to be defined for your application
2+
# Copy this file to .env file for development, create environment variables when deploying to production
3+
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration
4+
5+
###> symfony/framework-bundle ###
6+
APP_ENV=dev
7+
APP_SECRET=36e73c05f63bc2875d261e9652ed0d33
8+
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2
9+
#TRUSTED_HOSTS=localhost,example.com
10+
###< symfony/framework-bundle ###
11+
12+
###> symfony/swiftmailer-bundle ###
13+
# For Gmail as a transport, use: "gmail://username:password@localhost"
14+
# For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode="
15+
# Delivery is disabled by default via "null://localhost"
16+
MAILER_URL=null://localhost
17+
###< symfony/swiftmailer-bundle ###
18+
19+
###> doctrine/doctrine-bundle ###
20+
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
21+
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
22+
# Configure your db driver and server_version in config/packages/doctrine.yaml
23+
DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/db_name
24+
###< doctrine/doctrine-bundle ###

.gitignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
###> symfony/framework-bundle ###
3+
/.env
4+
/public/bundles/
5+
/var/
6+
/vendor/
7+
###< symfony/framework-bundle ###
8+
9+
###> symfony/webpack-encore-pack ###
10+
/node_modules/
11+
/public/build/
12+
npm-debug.log
13+
yarn-error.log
14+
###< symfony/webpack-encore-pack ###
15+
16+
###> symfony/phpunit-bridge ###
17+
.phpunit
18+
/phpunit.xml
19+
###< symfony/phpunit-bridge ###
20+
21+
###> symfony/web-server-bundle ###
22+
/.web-server-pid
23+
###< symfony/web-server-bundle ###

assets/.gitignore

Whitespace-only changes.

assets/css/custom.less

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* GKM version 0.1 */
2+
3+
body {
4+
div {
5+
color:black;
6+
}
7+
}

assets/js/app.vue

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<template>
2+
<div class="container">
3+
<nav class="navbar is-transparent">
4+
<div class="navbar-brand">
5+
<h1>Getting started with Symfony + VueJS</h1>
6+
</div>
7+
<div id="vue-menu" class="navbar-menu">
8+
<div class="navbar-start">
9+
<router-link tag='div' to="/" class="navbar-item">Home</router-link>
10+
<router-link tag='div' to="hello" class="navbar-item">Hello</router-link>
11+
<router-link tag='div' to="notfound" class="navbar-item">Not Found URL</router-link>
12+
</div>
13+
</div>
14+
</nav>
15+
<div>
16+
<router-view></router-view>
17+
</div>
18+
</div>
19+
</template>
20+
21+
<script>
22+
export default {
23+
name: "app"
24+
}
25+
</script>
26+
27+
<style>
28+
.container .navbar-item {
29+
cursor: pointer;
30+
text-decoration: underline;
31+
}
32+
33+
h1 {
34+
color:blue;
35+
}
36+
</style>

assets/js/components/hello.vue

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<template>
2+
<div id="vueApp">
3+
<div id="container">
4+
<div id="welcome">
5+
<h1>Hello Page</h1>
6+
</div>
7+
<div id="status">
8+
<p>
9+
You are now in <b>Hello vue route</b>
10+
</p>
11+
</div>
12+
</div>
13+
</div>
14+
</template>
15+
16+
<script>
17+
export default {
18+
name: "hello"
19+
}
20+
</script>
21+
22+
<style scoped lang="less">
23+
#welcome h1 {
24+
color: green;
25+
}
26+
</style>

assets/js/components/home.vue

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<template>
2+
<div id="vueApp">
3+
<div id="container">
4+
<div id="welcome">
5+
<h1>Home Page</h1>
6+
</div>
7+
<div id="status">
8+
<p>
9+
You are now in <b>Home vue route</b>
10+
</p>
11+
</div>
12+
</div>
13+
</div>
14+
</template>
15+
16+
<script>
17+
export default {
18+
name: "home"
19+
}
20+
</script>
21+
22+
<style scoped>
23+
#status p {
24+
color: green;
25+
}
26+
</style>

assets/js/components/notFound.vue

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<template>
2+
<section class="hero is-danger">
3+
<div class="hero-body">
4+
<div class="container">
5+
<h1 class="title">
6+
404 Page not found
7+
</h1>
8+
<p class="subtitle">
9+
its just another vue route - you can change the url above to any thing
10+
</p>
11+
</div>
12+
</div>
13+
</section>
14+
</template>
15+
16+
<script>
17+
export default {
18+
name: "notFound"
19+
}
20+
</script>
21+
22+
<style scoped lang="less">
23+
.title {
24+
color: #0000F0;
25+
}
26+
.hero-body {
27+
background-color: gray;
28+
padding: 15px;
29+
.title {
30+
color: white;
31+
}
32+
}
33+
</style>

assets/js/index.js

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/* GKM version 0.1 */
2+
import Vue from 'vue';
3+
import VueRouter from 'vue-router';
4+
5+
// app specific
6+
import router from './router/'
7+
import app from './app'
8+
9+
Vue.use(VueRouter);
10+
11+
12+
// bootstrap the demo
13+
let demo = new Vue({
14+
el: '#vueApp',
15+
router,
16+
template: '<app/>',
17+
components: { app }
18+
});

assets/js/router/index.js

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import Router from 'vue-router'
2+
3+
// components
4+
import home from '../components/home'
5+
import hello from '../components/hello'
6+
import notfound from '../components/notFound'
7+
8+
export default new Router({
9+
mode: 'history',
10+
routes: [
11+
{
12+
path: '/',
13+
name: 'homepage',
14+
component: home
15+
},
16+
{
17+
path: '/hello',
18+
name: 'Hello',
19+
component: hello
20+
},
21+
{
22+
path: '*',
23+
name: 'notfound',
24+
component: notfound
25+
}
26+
]
27+
})

bin/console

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
use App\Kernel;
5+
use Symfony\Bundle\FrameworkBundle\Console\Application;
6+
use Symfony\Component\Console\Input\ArgvInput;
7+
use Symfony\Component\Debug\Debug;
8+
use Symfony\Component\Dotenv\Dotenv;
9+
10+
set_time_limit(0);
11+
12+
require __DIR__.'/../vendor/autoload.php';
13+
14+
if (!class_exists(Application::class)) {
15+
throw new \RuntimeException('You need to add "symfony/framework-bundle" as a Composer dependency.');
16+
}
17+
18+
if (!isset($_SERVER['APP_ENV'])) {
19+
if (!class_exists(Dotenv::class)) {
20+
throw new \RuntimeException('APP_ENV environment variable is not defined. You need to define environment variables for configuration or add "symfony/dotenv" as a Composer dependency to load variables from a .env file.');
21+
}
22+
(new Dotenv())->load(__DIR__.'/../.env');
23+
}
24+
25+
$input = new ArgvInput();
26+
$env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'dev', true);
27+
$debug = (bool) ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)) && !$input->hasParameterOption('--no-debug', true);
28+
29+
if ($debug) {
30+
umask(0000);
31+
32+
if (class_exists(Debug::class)) {
33+
Debug::enable();
34+
}
35+
}
36+
37+
$kernel = new Kernel($env, $debug);
38+
$application = new Application($kernel);
39+
$application->run($input);

bin/phpunit

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
if (!file_exists(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit')) {
5+
echo "Unable to find the `simple-phpunit` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
6+
exit(1);
7+
}
8+
if (false === getenv('SYMFONY_PHPUNIT_REMOVE')) {
9+
putenv('SYMFONY_PHPUNIT_REMOVE=symfony/yaml');
10+
}
11+
if (false === getenv('SYMFONY_PHPUNIT_VERSION')) {
12+
putenv('SYMFONY_PHPUNIT_VERSION=6.5');
13+
}
14+
if (false === getenv('SYMFONY_PHPUNIT_DIR')) {
15+
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');
16+
}
17+
18+
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit';

composer.json

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"type": "project",
3+
"license": "proprietary",
4+
"require": {
5+
"php": ">=7",
6+
"ext-iconv": "*",
7+
"sensio/framework-extra-bundle": "^5.1",
8+
"symfony/asset": "^3.4",
9+
"symfony/console": "^3.4",
10+
"symfony/expression-language": "^3.4",
11+
"symfony/flex": "^1.0",
12+
"symfony/form": "^3.4",
13+
"symfony/framework-bundle": "^3.4",
14+
"symfony/lts": "^3",
15+
"symfony/monolog-bundle": "^3.1",
16+
"symfony/orm-pack": "*",
17+
"symfony/process": "^3.4",
18+
"symfony/security-bundle": "^3.4",
19+
"symfony/serializer-pack": "*",
20+
"symfony/swiftmailer-bundle": "^3.1",
21+
"symfony/twig-bundle": "^3.4",
22+
"symfony/validator": "^3.4",
23+
"symfony/web-link": "^3.4",
24+
"symfony/webpack-encore-pack": "*",
25+
"symfony/yaml": "^3.4"
26+
},
27+
"require-dev": {
28+
"symfony/debug-pack": "*",
29+
"symfony/dotenv": "^3.4",
30+
"symfony/maker-bundle": "^1.0",
31+
"symfony/profiler-pack": "*",
32+
"symfony/test-pack": "^1.0",
33+
"symfony/web-server-bundle": "^3.4"
34+
},
35+
"config": {
36+
"preferred-install": {
37+
"*": "dist"
38+
},
39+
"sort-packages": true
40+
},
41+
"autoload": {
42+
"psr-4": {
43+
"App\\": "src/"
44+
}
45+
},
46+
"autoload-dev": {
47+
"psr-4": {
48+
"App\\Tests\\": "tests/"
49+
}
50+
},
51+
"replace": {
52+
"symfony/polyfill-iconv": "*",
53+
"symfony/polyfill-php70": "*",
54+
"symfony/polyfill-php56": "*"
55+
},
56+
"scripts": {
57+
"auto-scripts": {
58+
"cache:clear": "symfony-cmd",
59+
"assets:install %PUBLIC_DIR%": "symfony-cmd"
60+
},
61+
"post-install-cmd": [
62+
"@auto-scripts"
63+
],
64+
"post-update-cmd": [
65+
"@auto-scripts"
66+
]
67+
},
68+
"conflict": {
69+
"symfony/symfony": "*"
70+
},
71+
"extra": {
72+
"symfony": {
73+
"allow-contrib": false
74+
}
75+
}
76+
}

0 commit comments

Comments
 (0)