Add styling
This commit is contained in:
parent
1df3a68843
commit
6b80c6e908
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -17,3 +17,10 @@
|
||||||
###> symfony/web-server-bundle ###
|
###> symfony/web-server-bundle ###
|
||||||
/.web-server-pid
|
/.web-server-pid
|
||||||
###< symfony/web-server-bundle ###
|
###< symfony/web-server-bundle ###
|
||||||
|
|
||||||
|
###> symfony/webpack-encore-bundle ###
|
||||||
|
/node_modules/
|
||||||
|
/public/build/
|
||||||
|
npm-debug.log
|
||||||
|
yarn-error.log
|
||||||
|
###< symfony/webpack-encore-bundle ###
|
||||||
|
|
5
assets/css/app.css
Normal file
5
assets/css/app.css
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
@tailwind base;
|
||||||
|
|
||||||
|
@tailwind components;
|
||||||
|
|
||||||
|
@tailwind utilities;
|
1
assets/js/app.js
Normal file
1
assets/js/app.js
Normal file
|
@ -0,0 +1 @@
|
||||||
|
require('../css/app.css');
|
|
@ -26,6 +26,7 @@
|
||||||
"symfony/twig-bundle": "4.3.*",
|
"symfony/twig-bundle": "4.3.*",
|
||||||
"symfony/validator": "4.3.*",
|
"symfony/validator": "4.3.*",
|
||||||
"symfony/web-link": "4.3.*",
|
"symfony/web-link": "4.3.*",
|
||||||
|
"symfony/webpack-encore-bundle": "^1.7",
|
||||||
"symfony/yaml": "4.3.*"
|
"symfony/yaml": "4.3.*"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
|
56
composer.lock
generated
56
composer.lock
generated
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "1a7e9428cb7994efcc2c427fc40fda15",
|
"content-hash": "5154766913f4dedca562de6da7503810",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "doctrine/annotations",
|
"name": "doctrine/annotations",
|
||||||
|
@ -5849,6 +5849,60 @@
|
||||||
],
|
],
|
||||||
"time": "2019-08-08T09:29:19+00:00"
|
"time": "2019-08-08T09:29:19+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/webpack-encore-bundle",
|
||||||
|
"version": "v1.7.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/webpack-encore-bundle.git",
|
||||||
|
"reference": "10acbc01d5653cdaf6169d9ee7034155fd9b731c"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/webpack-encore-bundle/zipball/10acbc01d5653cdaf6169d9ee7034155fd9b731c",
|
||||||
|
"reference": "10acbc01d5653cdaf6169d9ee7034155fd9b731c",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^7.1.3",
|
||||||
|
"symfony/asset": "^3.4 || ^4.0 || ^5.0",
|
||||||
|
"symfony/config": "^3.4 || ^4.0 || ^5.0",
|
||||||
|
"symfony/dependency-injection": "^3.4 || ^4.0 || ^5.0",
|
||||||
|
"symfony/http-kernel": "^3.4 || ^4.0 || ^5.0",
|
||||||
|
"symfony/service-contracts": "^1.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"fig/link-util": "^1.0",
|
||||||
|
"symfony/framework-bundle": "^3.4 || ^4.0 || ^5.0",
|
||||||
|
"symfony/phpunit-bridge": "^4.3.5 || ^5.0",
|
||||||
|
"symfony/twig-bundle": "^3.4 || ^4.0 || ^5.0",
|
||||||
|
"symfony/web-link": "^3.4 || ^4.0 || ^5.0"
|
||||||
|
},
|
||||||
|
"type": "symfony-bundle",
|
||||||
|
"extra": {
|
||||||
|
"thanks": {
|
||||||
|
"name": "symfony/webpack-encore",
|
||||||
|
"url": "https://github.com/symfony/webpack-encore"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\WebpackEncoreBundle\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Integration with your Symfony app & Webpack Encore!",
|
||||||
|
"time": "2019-10-22T13:35:56+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/yaml",
|
"name": "symfony/yaml",
|
||||||
"version": "v4.3.6",
|
"version": "v4.3.6",
|
||||||
|
|
|
@ -14,4 +14,5 @@ return [
|
||||||
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true],
|
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true],
|
||||||
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
|
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
|
||||||
Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['dev' => true],
|
Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['dev' => true],
|
||||||
|
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
|
||||||
];
|
];
|
||||||
|
|
3
config/packages/assets.yaml
Normal file
3
config/packages/assets.yaml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
framework:
|
||||||
|
assets:
|
||||||
|
json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'
|
4
config/packages/prod/webpack_encore.yaml
Normal file
4
config/packages/prod/webpack_encore.yaml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#webpack_encore:
|
||||||
|
# Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)
|
||||||
|
# Available in version 1.2
|
||||||
|
#cache: true
|
14
config/packages/webpack_encore.yaml
Normal file
14
config/packages/webpack_encore.yaml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
webpack_encore:
|
||||||
|
# The path where Encore is building the assets.
|
||||||
|
# This should match Encore.setOutputPath() in webpack.config.js.
|
||||||
|
output_path: '%kernel.project_dir%/public/build'
|
||||||
|
# If multiple builds are defined (as shown below), you can disable the default build:
|
||||||
|
# output_path: false
|
||||||
|
|
||||||
|
# if using Encore.enableIntegrityHashes() specify the crossorigin attribute value (default: false, or use 'anonymous' or 'use-credentials')
|
||||||
|
# crossorigin: 'anonymous'
|
||||||
|
|
||||||
|
# Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes).
|
||||||
|
# To enable caching for the production environment, creating a webpack_encore.yaml in the config/packages/prod directory with this value set to true
|
||||||
|
# Available in version 1.2
|
||||||
|
#cache: false
|
21
package.json
Normal file
21
package.json
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"devDependencies": {
|
||||||
|
"@symfony/webpack-encore": "^0.28.0",
|
||||||
|
"autoprefixer": "^9.7.1",
|
||||||
|
"core-js": "^3.0.0",
|
||||||
|
"postcss-loader": "^3.0.0",
|
||||||
|
"regenerator-runtime": "^0.13.2",
|
||||||
|
"webpack-notifier": "^1.6.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"tailwindcss": "^1.1.3"
|
||||||
|
},
|
||||||
|
"license": "UNLICENSED",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"dev-server": "encore dev-server",
|
||||||
|
"dev": "encore dev",
|
||||||
|
"watch": "encore dev --watch",
|
||||||
|
"build": "encore production --progress"
|
||||||
|
}
|
||||||
|
}
|
6
postcss.config.js
Normal file
6
postcss.config.js
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
module.exports = {
|
||||||
|
plugins: [
|
||||||
|
require('tailwindcss'),
|
||||||
|
require('autoprefixer')
|
||||||
|
]
|
||||||
|
}
|
18
symfony.lock
18
symfony.lock
|
@ -498,6 +498,24 @@
|
||||||
"ref": "dae9b39fd6717970be7601101ce5aa960bf53d9a"
|
"ref": "dae9b39fd6717970be7601101ce5aa960bf53d9a"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"symfony/webpack-encore-bundle": {
|
||||||
|
"version": "1.0",
|
||||||
|
"recipe": {
|
||||||
|
"repo": "github.com/symfony/recipes",
|
||||||
|
"branch": "master",
|
||||||
|
"version": "1.0",
|
||||||
|
"ref": "d3b160b9799c91cbfc3df6f018c795f3bf88698a"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"assets/css/app.css",
|
||||||
|
"assets/js/app.js",
|
||||||
|
"config/packages/assets.yaml",
|
||||||
|
"config/packages/prod/webpack_encore.yaml",
|
||||||
|
"config/packages/webpack_encore.yaml",
|
||||||
|
"package.json",
|
||||||
|
"webpack.config.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
"symfony/yaml": {
|
"symfony/yaml": {
|
||||||
"version": "v4.3.6"
|
"version": "v4.3.6"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,12 +1,16 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html class="text-lg lg:text-4xl">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>{% block title %}Welcome!{% endblock %}</title>
|
<title>{% block title %}Welcome!{% endblock %}</title>
|
||||||
{% block stylesheets %}{% endblock %}
|
{% block stylesheets %}
|
||||||
|
{{ encore_entry_link_tags('app') }}
|
||||||
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{% block body %}{% endblock %}
|
{% block body %}{% endblock %}
|
||||||
{% block javascripts %}{% endblock %}
|
{% block javascripts %}
|
||||||
|
{{ encore_entry_script_tags('app') }}
|
||||||
|
{% endblock %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -3,5 +3,9 @@
|
||||||
{% block title %}Hi {{ eventName }}!{% endblock %}
|
{% block title %}Hi {{ eventName }}!{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<h1>Hi {{ eventName }}!</h1>
|
<div class="min-h-screen flex items-center justify-center font-sans bg-gray-100 antialiased">
|
||||||
|
<div class="p-4">
|
||||||
|
<h1 class="text-4xl font-semibold text-center text-gray-800">Hi {{ eventName }}!</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
25
webpack.config.js
Normal file
25
webpack.config.js
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
var Encore = require('@symfony/webpack-encore');
|
||||||
|
|
||||||
|
if (!Encore.isRuntimeEnvironmentConfigured()) {
|
||||||
|
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
|
||||||
|
}
|
||||||
|
|
||||||
|
Encore
|
||||||
|
.setOutputPath('public/build/')
|
||||||
|
.setPublicPath('/build')
|
||||||
|
|
||||||
|
.addEntry('app', './assets/js/app.js')
|
||||||
|
.splitEntryChunks()
|
||||||
|
.enableSingleRuntimeChunk()
|
||||||
|
.cleanupOutputBeforeBuild()
|
||||||
|
.enableBuildNotifications()
|
||||||
|
.enableSourceMaps(!Encore.isProduction())
|
||||||
|
.enableVersioning(Encore.isProduction())
|
||||||
|
.configureBabel(() => {}, {
|
||||||
|
useBuiltIns: 'usage',
|
||||||
|
corejs: 3
|
||||||
|
})
|
||||||
|
.enablePostCssLoader()
|
||||||
|
;
|
||||||
|
|
||||||
|
module.exports = Encore.getWebpackConfig();
|
Loading…
Reference in a new issue