-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Webpack config * Remove config for webpack * Add twig component configuration * add symfony ux packages * add a way to ignore thelia setting the default view --------- Co-authored-by: yannleravallec <[email protected]>
- Loading branch information
Showing
30 changed files
with
624 additions
and
33 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# Ignore compiled files. | ||
dist | ||
dist/**/* | ||
!dist/.gitkeep | ||
|
||
|
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
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div class="alert" role="alert"> | ||
{{ message }} | ||
</div> |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { startStimulusApp } from '@symfony/stimulus-bridge'; | ||
import { registerReactControllerComponents } from '@symfony/ux-react'; | ||
|
||
registerReactControllerComponents( | ||
require.context('./react/controllers', true, /\.(j|t)sx?$/) | ||
); | ||
|
||
// Registers Stimulus controllers from controllers.json and in the controllers/ directory | ||
export const app = startStimulusApp( | ||
require.context( | ||
'@symfony/stimulus-bridge/lazy-controller-loader!./controllers', | ||
true, | ||
/\.[jt]sx?$/ | ||
) | ||
); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"controllers": { | ||
"@symfony/ux-live-component": { | ||
"live": { | ||
"enabled": true, | ||
"fetch": "eager", | ||
"autoimport": { | ||
"@symfony/ux-live-component/dist/live.min.css": true | ||
} | ||
} | ||
}, | ||
"@symfony/ux-react": { | ||
"react": { | ||
"enabled": true, | ||
"fetch": "eager" | ||
} | ||
} | ||
}, | ||
"entrypoints": [] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Controller } from '@hotwired/stimulus'; | ||
import { trans, EXPIRED } from '../translator'; | ||
/* | ||
* This is an example Stimulus controller! | ||
* | ||
* Any element with a data-controller="hello" attribute will cause | ||
* this controller to be executed. The name "hello" comes from the filename: | ||
* hello_controller.js -> "hello" | ||
* | ||
* Delete this file or adapt it for your use! | ||
*/ | ||
class HelloController extends Controller { | ||
connect() { | ||
this.element.textContent = `Hello Stimulus! Edit me in assets/controllers/hello_controller.js \n | ||
test translation: ${trans(EXPIRED)}`; | ||
} | ||
} | ||
|
||
export default HelloController; |
File renamed without changes.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import React from 'react'; | ||
|
||
export default function (props) { | ||
return <div>Hello {props.fullName}</div>; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { localeFallbacks } from '../translations/compiled/configuration'; | ||
import { trans, setLocaleFallbacks } from '@symfony/ux-translator'; | ||
/* | ||
* This file is part of the Symfony UX Translator package. | ||
* | ||
* If folder "../var/translations" does not exist, or some translations are missing, | ||
* you must warmup your Symfony cache to refresh JavaScript translations. | ||
* | ||
* If you use TypeScript, you can rename this file to "translator.ts" to take advantage of types checking. | ||
*/ | ||
|
||
setLocaleFallbacks(localeFallbacks); | ||
|
||
export { trans }; | ||
|
||
export * from '../translations/compiled'; |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,22 @@ | ||
{ | ||
"name": "thelia/flexy", | ||
"type": "thelia-frontoffice-template", | ||
"type": "symfony-bundle", | ||
"description": "thelia design system", | ||
"license": "LGPL-3.0+", | ||
"require": { | ||
"composer/installers": "~1.0", | ||
"symfony/webpack-encore-bundle": "*" | ||
"symfony/webpack-encore-bundle": "^2.1", | ||
"symfony/ux-twig-component": "^2.19", | ||
"symfony/stimulus-bundle": "^2.19", | ||
"symfony/ux-react": "^2.19", | ||
"symfony/ux-icons": "^2.19", | ||
"symfony/ux-translator": "^2.19", | ||
"symfony/ux-live-component": "^2.19" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"FlexyBundle\\": "src/", | ||
"FlexyBundle\\Twig\\": "src/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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.