mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-30 23:09:32 +00:00
Updated symfony recipes.
This commit is contained in:
parent
f20f1ffa13
commit
0da879347d
9 changed files with 60 additions and 11 deletions
12
assets/app.js
Normal file
12
assets/app.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* Welcome to your app's main JavaScript file!
|
||||
*
|
||||
* We recommend including the built version of this JavaScript file
|
||||
* (and its CSS file) in your base layout (base.html.twig).
|
||||
*/
|
||||
|
||||
// any CSS you import will output into a single css file (app.css in this case)
|
||||
import './styles/app.css';
|
||||
|
||||
// start the Stimulus application
|
||||
import './bootstrap';
|
||||
5
assets/bootstrap.js
vendored
Normal file
5
assets/bootstrap.js
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import { startStimulusApp } from '@symfony/stimulus-bridge';
|
||||
import '@symfony/autoimport';
|
||||
|
||||
// Registers Stimulus controllers from controllers.json and in the controllers/ directory
|
||||
export const app = startStimulusApp(require.context('./controllers', true, /\.(j|t)sx?$/));
|
||||
4
assets/controllers.json
Normal file
4
assets/controllers.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"controllers": [],
|
||||
"entrypoints": []
|
||||
}
|
||||
16
assets/controllers/hello_controller.js
Normal file
16
assets/controllers/hello_controller.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { Controller } from 'stimulus';
|
||||
|
||||
/*
|
||||
* 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!
|
||||
*/
|
||||
export default class extends Controller {
|
||||
connect() {
|
||||
this.element.textContent = 'Hello Stimulus! Edit me in assets/controllers/hello_controller.js';
|
||||
}
|
||||
}
|
||||
3
assets/styles/app.css
Normal file
3
assets/styles/app.css
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
body {
|
||||
background-color: lightgray;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue