First attempt to remove JSP and move to Thymeleaf and update to Spring Boot. The Thymeleaf templates can be loaded as snippets which makes it more easy to move away from ECS and create normal HTML pages for a lesson.
This commit is contained in:
35
webgoat-container/src/main/resources/static/js/main.js
Normal file
35
webgoat-container/src/main/resources/static/js/main.js
Normal file
@ -0,0 +1,35 @@
|
||||
//main.js
|
||||
/*
|
||||
/js
|
||||
js/main.js << main file for require.js
|
||||
--/libs/(jquery,backbone,etc.) << base libs
|
||||
--/goatApp/ << base dir for goat application, js-wise
|
||||
--/goatApp/model
|
||||
--/goatApp/view
|
||||
--/goatApp/support
|
||||
--/goatApp/controller
|
||||
*/
|
||||
|
||||
require.config({
|
||||
baseUrl: "js/",
|
||||
paths: {
|
||||
jquery: 'libs/jquery-1.10.2.min',
|
||||
underscore: 'libs/underscore-min',
|
||||
backbone: 'libs/backbone-min',
|
||||
templates: 'goatApp/templates'
|
||||
}
|
||||
,
|
||||
shim: {
|
||||
underscore: {
|
||||
exports: "_"
|
||||
},
|
||||
backbone: {
|
||||
deps: ['underscore', 'jquery'],
|
||||
exports: 'Backbone'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
require(['jquery','underscore','backbone','goatApp/goatApp'], function($,_,Backbone,Goat){
|
||||
Goat.initApp();
|
||||
});
|
Reference in New Issue
Block a user