Skip to content

Commit 58f47d5

Browse files
Merge pull request #40 from Roky97/Release-2.9.0
Release 2.9.0
2 parents 8e628e7 + f8829ea commit 58f47d5

File tree

10 files changed

+499
-322
lines changed

10 files changed

+499
-322
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["@babel/preset-env"]
3+
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,17 +113,17 @@ If you like it, you can use our [EmbASPServerExecutor](https://github.com/DeMaCS
113113
- [Font Awesome Icons 4.7](https://fontawesome.com/v4.7.0/icons/) - Icon set used
114114
- [jQuery](https://jquery.com) and [its UI Layout plugin](http://plugins.jquery.com/layout) - Used to improve the UI
115115
- [jQuery contextMenu 2](https://swisnl.github.io/jQuery-contextMenu/) - Used for to create the context menus
116-
- [keymaster.js](https://github.com/madrobby/keymaster) - Used to implement keyboard shortcuts outside the editor
116+
- [Mousetrap](https://craig.is/killing/mice) - Used to implement keyboard shortcuts outside the editor
117117
- [Pugjs](https://pugjs.org) - Used to create a dynamic html pages
118118
- [Socket.io](https://socket.io) - Used for executor server connection
119119
- [Browsersync](https://www.browsersync.io) - Used to enable the live reload on the browser
120120
- [Gulp](https://gulpjs.com) - Used to automate and enhance the workflow with its plugins:
121121
- [gulp-nodemon](https://github.com/JacksonGariety/gulp-nodemon) - Used to monitor for any changes in the source files and automatically restart the server
122+
- [gulp-babel](https://github.com/babel/gulp-babel#readme) - Used to used to convert ECMAScript 2015+ code into a backwards compatible version of JavaScript
122123
- [gulp-clean](https://github.com/peter-vilja/gulp-clean) - Used to remove files and folders
123124
- [gulp-uglify-es](https://gitlab.com/itayronen/gulp-uglify-es) - Used to minify JS files
124125
- [gulp-autoprefixer](https://github.com/sindresorhus/gulp-autoprefixer#readme) - Used to add CSS prefix
125126
- [gulp-csso](https://github.com/ben-eb/gulp-csso) - Used to minify CSS files
126-
- [gulp-shorthand](https://github.com/kevva/gulp-shorthand) - Used to make the CSS files lighter and more readable
127127
- [gulp-imagemin](https://github.com/sindresorhus/gulp-imagemin#readme) - Used to minify PNG, JPEG, GIF and SVG images
128128

129129
<!--

app.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ var http = require('http');
55
var forceSSL = require('express-force-ssl');
66
var webSocket = require('websocket').w3cwebsocket;
77
var fs = require('fs');
8-
var pug = require('pug');
98
var jpointer = require('json-pointer');
109
const compression = require('compression');
1110

@@ -24,6 +23,7 @@ const resourcesPath = currentEnv == environment.prod ? path.dist : path.src
2423

2524
// System config loading
2625
var properties = require('./config/app-config.json');
26+
var loideUrl = properties.loide_url;
2727
var httpPort = properties.port.http;
2828
var httpsPortP = properties.port.https;
2929
var key = properties.path.key;
@@ -63,8 +63,10 @@ if (key.length !== 0 && cert.length !== 0) {
6363
}
6464

6565
// Sets "Strict-Transport-Security, by default maxAge is set 1 year in seconds
66-
app.use(helmet.hsts({
67-
maxAge: maxAge
66+
app.use(helmet({
67+
hsts: {
68+
maxAge: maxAge
69+
}
6870
}));
6971

7072
app.use(compression());
@@ -74,7 +76,7 @@ app.set('view engine', 'pug');
7476

7577
// Load variables in to the .pug file
7678
app.get('/', function (req, res) {
77-
res.render('index', {"languages": servicesConfig.languages});
79+
res.render('index', {"languages": servicesConfig.languages, "loideUrl": loideUrl});
7880
});
7981

8082
app.post('/version', function (req, res) { // send the version (and take it in package.json) of the application
@@ -113,9 +115,6 @@ io.sockets.on('connection', function (socket) { // Wait for the incoming connect
113115

114116
client.onerror = function (error) {
115117
print_log('WebSocket problem:\n' + JSON.stringify(error, null, '\t'));
116-
socket.emit('problem', {
117-
reason: error
118-
});
119118
socket.emit('problem', {
120119
reason: 'Execution error, please try again later!'
121120
});

config/app-config-schema.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99
},
1010
"type": "object",
1111
"properties": {
12+
"loide_url": {
13+
"title": "LoIDE URL",
14+
"description": "This is the URL where the application can be reached",
15+
"type": "string",
16+
"minimum": 0
17+
},
1218
"max_age": {
1319
"title": "HSTS max age",
1420
"description": "This property specifies HTTP Strict Transport Security max age.",

config/app-config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
"key" : "",
1010
"cert" : ""
1111
},
12-
"max_age" : 31536000
12+
"max_age" : 31536000,
13+
"loide_url" : "url"
1314
}

gulpfile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
const { series, src, dest, parallel } = require('gulp');
22
const csso = require('gulp-csso');
3-
const shorthand = require('gulp-shorthand');
43
const clean = require('gulp-clean');
54
const autoprefixer = require('gulp-autoprefixer');
65
const uglify = require('gulp-uglify-es').default;
76
const imagemin = require('gulp-imagemin');
87
const nodemon = require('gulp-nodemon')
98
var browserSync = require('browser-sync').create();
9+
var babel = require("gulp-babel");
1010

1111
const path = {
1212
dist: 'dist/',
@@ -32,7 +32,6 @@ function css() {
3232
.pipe(autoprefixer({
3333
cascade: false
3434
}))
35-
.pipe(shorthand())
3635
.pipe(csso())
3736
.pipe(dest(path.dist + 'css/'))
3837
}
@@ -56,6 +55,7 @@ function img() {
5655

5756
function js() {
5857
return src(path.src + 'js/**/*.js')
58+
.pipe(babel())
5959
.pipe(uglify())
6060
.pipe(dest(path.dist + 'js/'))
6161
}

package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "LoIDE",
3-
"version": "2.8.0",
2+
"name": "loide",
3+
"version": "2.9.0",
44
"description": "Web-based IDE for Logic Programming",
55
"main": "app.js",
66
"scripts": {
@@ -40,25 +40,27 @@
4040
"url": "https://github.com/DeMaCS-UNICAL/LoIDE/issues"
4141
},
4242
"dependencies": {
43-
"ajv": "^6.12.2",
43+
"ajv": "^6.12.4",
4444
"express": "^4.17.1",
4545
"express-force-ssl": "^0.3.2",
4646
"helmet": "^3.21.1",
4747
"json-pointer": "^0.6.0",
4848
"pug": "^3.0.0",
4949
"socket.io": "^2.3.0",
50-
"websocket": "^1.0.30"
50+
"websocket": "^1.0.32"
5151
},
5252
"devDependencies": {
53+
"@babel/core": "^7.11.5",
54+
"@babel/preset-env": "^7.11.5",
5355
"browser-sync": "^2.26.7",
5456
"compression": "^1.7.3",
5557
"gulp": "^4.0.2",
5658
"gulp-autoprefixer": "^7.0.1",
59+
"gulp-babel": "^8.0.0",
5760
"gulp-clean": "^0.4.0",
5861
"gulp-csso": "^4.0.1",
5962
"gulp-imagemin": "^7.1.0",
6063
"gulp-nodemon": "^2.5.0",
61-
"gulp-shorthand": "^1.1.0",
6264
"gulp-uglify-es": "^2.0.0"
6365
},
6466
"analyze": true,

resources/css/style.css

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,6 @@
102102
}
103103
}
104104

105-
#beta {
106-
font-family: "Dancing Script", cursive;
107-
font-size: 22px;
108-
vertical-align: top;
109-
}
110-
111105
.splashscreen {
112106
position: fixed;
113107
top:0;
@@ -697,6 +691,10 @@ label[for="run-dot"] {
697691
cursor: pointer;
698692
}
699693

694+
.keybox, .shortcut-title{
695+
font-size: 16px;
696+
}
697+
700698
/*DARK-MODE SECTION*/
701699

702700
body.dark {
@@ -774,7 +772,7 @@ body.dark .toast-header {
774772
background-color: rgba(144, 144, 144, 0.85);
775773
}
776774

777-
body.dark .navbar-brand {
775+
body.dark .navbar-brand, body.dark .about-logo {
778776
filter: invert(100%);
779777
}
780778

0 commit comments

Comments
 (0)