parent
c8eb551321
commit
2bd10a66e5
32 changed files with 1385 additions and 14424 deletions
@ -1,12 +0,0 @@ |
||||
/* |
||||
* 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'; |
@ -1,11 +0,0 @@ |
||||
import { startStimulusApp } from '@symfony/stimulus-bridge'; |
||||
|
||||
// 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?$/ |
||||
)); |
||||
|
||||
// register any custom, 3rd party controllers here
|
||||
// app.register('some_controller_name', SomeImportedController);
|
@ -1,4 +0,0 @@ |
||||
{ |
||||
"controllers": [], |
||||
"entrypoints": [] |
||||
} |
@ -1,16 +0,0 @@ |
||||
import { Controller } from '@hotwired/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'; |
||||
} |
||||
} |
@ -1,19 +1,23 @@ |
||||
const moment = require('moment'); |
||||
//obviously, loading moment js is required.
|
||||
export const load = (option, tdClasses, tdFactory) => { |
||||
tdClasses.Dates.prototype.setFromInput = function(value, index) { |
||||
let converted = moment(value, option); |
||||
if (converted.isValid()) { |
||||
let date = tdFactory.DateTime.convert(converted.toDate(), this.optionsStore.options.localization.locale); |
||||
this.setValue(date, index); |
||||
} |
||||
else { |
||||
console.warn('Momentjs failed to parse the input date.'); |
||||
import moment from "moment"; |
||||
|
||||
export default { |
||||
//obviously, loading moment js is required.
|
||||
load: (option, tdClasses, tdFactory) => { |
||||
tdClasses.Dates.prototype.setFromInput = function(value, index) { |
||||
let converted = moment(value, option); |
||||
if (converted.isValid()) { |
||||
let date = tdFactory.DateTime.convert(converted.toDate(), this.optionsStore.options.localization.locale); |
||||
this.setValue(date, index); |
||||
} |
||||
else { |
||||
console.warn('Momentjs failed to parse the input date.'); |
||||
} |
||||
} |
||||
} |
||||
|
||||
tdClasses.Dates.prototype.formatInput = function(date) { |
||||
return moment(date).format(option); |
||||
tdClasses.Dates.prototype.formatInput = function(date) { |
||||
return moment(date).format(option); |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
|
@ -0,0 +1 @@ |
||||
import '/assets/scss/security/login.scss'; |
@ -1,2 +1,2 @@ |
||||
@import "~bootstrap/dist/css/bootstrap.css"; |
||||
@import "~bootstrap-dark-5/dist/css/bootstrap-dark.css"; |
||||
@import "/node_modules/bootstrap/dist/css/bootstrap.css"; |
||||
@import "/node_modules/bootstrap-dark-5/dist/css/bootstrap-dark.css"; |
||||
|
@ -1,4 +1,4 @@ |
||||
@import "assets/scss/base"; |
||||
@import "assets/scss/icons"; |
||||
@import "~@eonasdan/tempus-dominus/dist/css/tempus-dominus.css"; |
||||
@import "/node_modules/@eonasdan/tempus-dominus/dist/css/tempus-dominus.css"; |
||||
@import "assets/scss/tempus-dominus-dark"; |
@ -1,3 +0,0 @@ |
||||
body { |
||||
background-color: lightgray; |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -1,49 +0,0 @@ |
||||
webpack_encore: |
||||
# The path where Encore is building the assets - i.e. Encore.setOutputPath() |
||||
output_path: '%kernel.project_dir%/public/build' |
||||
# If multiple builds are defined (as shown below), you can disable the default build: |
||||
# output_path: false |
||||
|
||||
# Set attributes that will be rendered on all script and link tags |
||||
script_attributes: |
||||
defer: true |
||||
# Uncomment (also under link_attributes) if using Turbo Drive |
||||
# https://turbo.hotwired.dev/handbook/drive#reloading-when-assets-change |
||||
# 'data-turbo-track': reload |
||||
# link_attributes: |
||||
# Uncomment if using Turbo Drive |
||||
# 'data-turbo-track': reload |
||||
|
||||
# If using Encore.enableIntegrityHashes() and need the crossorigin attribute (default: false, or use 'anonymous' or 'use-credentials') |
||||
# crossorigin: 'anonymous' |
||||
|
||||
# Preload all rendered script and link tags automatically via the HTTP/2 Link header |
||||
# preload: true |
||||
|
||||
# Throw an exception if the entrypoints.json file is missing or an entry is missing from the data |
||||
# strict_mode: false |
||||
|
||||
# If you have multiple builds: |
||||
# builds: |
||||
# pass "frontend" as the 3rg arg to the Twig functions |
||||
# {{ encore_entry_script_tags('entry1', null, 'frontend') }} |
||||
|
||||
# frontend: '%kernel.project_dir%/public/frontend/build' |
||||
|
||||
# Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes) |
||||
# Put in config/packages/prod/webpack_encore.yaml |
||||
# cache: true |
||||
|
||||
framework: |
||||
assets: |
||||
json_manifest_path: '%kernel.project_dir%/public/build/manifest.json' |
||||
|
||||
#when@prod: |
||||
# webpack_encore: |
||||
# # Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes) |
||||
# # Available in version 1.2 |
||||
# cache: true |
||||
|
||||
#when@test: |
||||
# webpack_encore: |
||||
# strict_mode: false |
@ -0,0 +1,3 @@ |
||||
_pentatrion_vite: |
||||
prefix: /build |
||||
resource: "@PentatrionViteBundle/Resources/config/routing.yaml" |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,33 @@ |
||||
import { defineConfig } from "vite"; |
||||
import symfonyPlugin from "vite-plugin-symfony"; |
||||
|
||||
/* if you're using React */ |
||||
// import react from '@vitejs/plugin-react';
|
||||
|
||||
export default defineConfig({ |
||||
plugins: [ |
||||
/* react(), // if you're using React */ |
||||
symfonyPlugin(), |
||||
], |
||||
root: ".", |
||||
base: "/build/", |
||||
build: { |
||||
manifest: true, |
||||
emptyOutDir: true, |
||||
assetsDir: "", |
||||
outDir: "./public/build", |
||||
rollupOptions: { |
||||
input: { |
||||
'security.login' : "./assets/js/security/login.js", |
||||
'job.index' : "./assets/js/job/index.js", |
||||
'job.view' : "./assets/js/job/view.js", |
||||
'job.add' : "./assets/js/job/add.js" |
||||
}, |
||||
}, |
||||
}, |
||||
server: { |
||||
hmr: { |
||||
protocol: 'ws' |
||||
} |
||||
} |
||||
}); |
@ -1,73 +0,0 @@ |
||||
const Encore = require('@symfony/webpack-encore'); |
||||
|
||||
// Manually configure the runtime environment if not already configured yet by the "encore" command.
|
||||
// It's useful when you use tools that rely on webpack.config.js file.
|
||||
if (!Encore.isRuntimeEnvironmentConfigured()) { |
||||
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev'); |
||||
} |
||||
|
||||
Encore |
||||
// directory where compiled assets will be stored
|
||||
.setOutputPath('public/build/') |
||||
// public path used by the web server to access the output path
|
||||
.setPublicPath('/build') |
||||
// only needed for CDN's or sub-directory deploy
|
||||
//.setManifestKeyPrefix('build/')
|
||||
|
||||
/* |
||||
* ENTRY CONFIG |
||||
* |
||||
* Add 1 entry for each "page" of your app |
||||
* (including one that's included on every page - e.g. "app") |
||||
* |
||||
* Each entry will result in one JavaScript file (e.g. app.js) |
||||
* and one CSS file (e.g. app.css) if your JavaScript imports CSS. |
||||
*/ |
||||
.addEntry('security.login', ['./assets/js/security/login.js', './assets/scss/security/login.scss']) |
||||
.addEntry('job.index', ['./assets/js/job/index.js', './assets/scss/job/index.scss']) |
||||
.addEntry('job.view', ['./assets/js/job/view.js', './assets/scss/job/view.scss']) |
||||
.addEntry('job.add', ['./assets/js/job/add.js', './assets/scss/job/add.scss']) |
||||
//.addEntry('page1', './assets/page1.js')
|
||||
//.addEntry('page2', './assets/page2.js')
|
||||
|
||||
// When enabled, Webpack "splits" your files into smaller pieces for greater optimization.
|
||||
// .splitEntryChunks()
|
||||
|
||||
// will require an extra script tag for runtime.js
|
||||
// but, you probably want this, unless you're building a single-page app
|
||||
.enableSingleRuntimeChunk() |
||||
|
||||
/* |
||||
* FEATURE CONFIG |
||||
* |
||||
* Enable & configure other features below. For a full |
||||
* list of features, see: |
||||
* https://symfony.com/doc/current/frontend.html#adding-more-features
|
||||
*/ |
||||
.cleanupOutputBeforeBuild() |
||||
//.enableBuildNotifications()
|
||||
.enableSourceMaps(!Encore.isProduction()) |
||||
// enables hashed filenames (e.g. app.abc123.css)
|
||||
.enableVersioning(Encore.isProduction()) |
||||
|
||||
// enables Sass/SCSS support
|
||||
.enableSassLoader() |
||||
|
||||
// uncomment if you use TypeScript
|
||||
//.enableTypeScriptLoader()
|
||||
|
||||
// uncomment to get integrity="..." attributes on your script & link tags
|
||||
// requires WebpackEncoreBundle 1.4 or higher
|
||||
//.enableIntegrityHashes(Encore.isProduction())
|
||||
|
||||
// uncomment if you're having problems with a jQuery plugin
|
||||
//.autoProvidejQuery()
|
||||
|
||||
// uncomment if you use API Platform Admin (composer require api-admin)
|
||||
//.enableReactPreset()
|
||||
//.addEntry('admin', './assets/admin.js')
|
||||
|
||||
//.autoProvideVariables({ })
|
||||
; |
||||
|
||||
module.exports = Encore.getWebpackConfig(); |
Loading…
Reference in new issue