File tree Expand file tree Collapse file tree 6 files changed +34
-20
lines changed Expand file tree Collapse file tree 6 files changed +34
-20
lines changed Original file line number Diff line number Diff line change 1- require ( 'eonasdan-bootstrap-datetimepicker' ) ;
2-
3- require ( 'imports-loader?define=>false!typeahead.js/dist/typeahead.jquery.min.js' ) ;
4- const Bloodhound = require ( 'imports-loader?define=>false!typeahead.js/dist/bloodhound.js' ) ;
5- window . Bloodhound = Bloodhound ;
6- require ( '../scss/bootstrap-tagsinput.scss' ) ;
7- require ( 'bootstrap-tagsinput' ) ;
1+ import 'eonasdan-bootstrap-datetimepicker' ;
2+ import 'typeahead.js' ;
3+ import Bloodhound from "bloodhound-js" ;
4+ import 'bootstrap-tagsinput' ;
85
96$ ( function ( ) {
107 // Datetime picker initialization.
@@ -33,16 +30,17 @@ $(function() {
3330 datumTokenizer : Bloodhound . tokenizers . whitespace
3431 } ) ;
3532 source . initialize ( ) ;
33+
3634 $input . tagsinput ( {
3735 trimValue : true ,
3836 focusClass : 'focus' ,
39- typeahead : {
37+ typeaheadjs : {
4038 name : 'tags' ,
4139 source : source . ttAdapter ( )
4240 }
4341 } ) ;
4442 }
45- } )
43+ } ) ;
4644
4745// Handling the modal confirmation message.
4846$ ( document ) . on ( 'submit' , 'form[data-confirmation]' , function ( event ) {
Original file line number Diff line number Diff line change 11// loads the Bootstrap jQuery plugins
2- require ( 'bootstrap-sass/assets/javascripts/bootstrap/dropdown.js' ) ;
3- require ( 'bootstrap-sass/assets/javascripts/bootstrap/modal.js' ) ;
4- require ( 'bootstrap-sass/assets/javascripts/bootstrap/transition.js' ) ;
2+ import 'bootstrap-sass/assets/javascripts/bootstrap/dropdown.js' ;
3+ import 'bootstrap-sass/assets/javascripts/bootstrap/modal.js' ;
4+ import 'bootstrap-sass/assets/javascripts/bootstrap/transition.js' ;
55
66// loads the code syntax highlighting library
7- require ( './highlight.js' ) ;
7+ import './highlight.js' ;
Original file line number Diff line number Diff line change 1- var hljs = require ( 'highlight.js/lib/highlight.js' ) ;
1+ import hljs from 'highlight.js/lib/highlight' ;
2+ import php from 'highlight.js/lib/languages/php' ;
3+ import twig from 'highlight.js/lib/languages/twig' ;
24
3- hljs . configure ( {
4- languages : [ 'twig' , 'php' ]
5- } ) ;
5+ hljs . registerLanguage ( 'php' , php ) ;
6+ hljs . registerLanguage ( 'twig' , twig ) ;
67
78hljs . initHighlightingOnLoad ( ) ;
8-
9- module . exports = hljs ;
Original file line number Diff line number Diff line change 11@import " ~bootswatch/flatly/variables" ;
22@import " ~eonasdan-bootstrap-datetimepicker/src/sass/bootstrap-datetimepicker-build.scss" ;
3+ @import " bootstrap-tagsinput.scss" ;
34
45/* Page: 'Backend post index'
56 ------------------------------------------------------------------------- */
Original file line number Diff line number Diff line change 1414 "node-sass" : " ^4.5.3" ,
1515 "sass-loader" : " ^6.0.5" ,
1616 "typeahead.js" : " ^0.11.1"
17+ },
18+ "scripts" : {
19+ "dev-server" : " ./node_modules/.bin/encore dev-server" ,
20+ "dev" : " ./node_modules/.bin/encore dev" ,
21+ "watch" : " ./node_modules/.bin/encore dev --watch" ,
22+ "build" : " ./node_modules/.bin/encore production"
1723 }
1824}
Original file line number Diff line number Diff line change 11var Encore = require ( '@symfony/webpack-encore' ) ;
2+ var webpack = require ( 'webpack' ) ;
23
34Encore
45 . setOutputPath ( 'web/build/' )
56 . setPublicPath ( '/build' )
67 . cleanupOutputBeforeBuild ( )
78 . autoProvidejQuery ( )
9+ . autoProvideVariables ( {
10+ "window.jQuery" : "jquery" ,
11+ "window.Bloodhound" : require . resolve ( 'bloodhound-js' ) ,
12+ "jQuery.tagsinput" : "bootstrap-tagsinput"
13+ } )
814 . enableSassLoader ( )
915 . enableVersioning ( false )
1016 . createSharedEntry ( 'js/common' , [ 'jquery' ] )
1521 . addStyleEntry ( 'css/admin' , [ './app/Resources/assets/scss/admin.scss' ] )
1622;
1723
18- module . exports = Encore . getWebpackConfig ( ) ;
24+ var config = Encore . getWebpackConfig ( ) ;
25+
26+ config . plugins . push ( new webpack . IgnorePlugin ( / ^ \. \/ l o c a l e $ / , / m o m e n t $ / ) ) ;
27+
28+ module . exports = config ;
You can’t perform that action at this time.
0 commit comments