Skip to content

Commit

Permalink
Merge pull request #40 from Roky97/Release-2.9.0
Browse files Browse the repository at this point in the history
Release 2.9.0
  • Loading branch information
stefanogermano committed Sep 5, 2020
2 parents 8e628e7 + f8829ea commit 58f47d5
Show file tree
Hide file tree
Showing 10 changed files with 499 additions and 322 deletions.
3 changes: 3 additions & 0 deletions .babelrc
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env"]
}
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -113,17 +113,17 @@ If you like it, you can use our [EmbASPServerExecutor](https://github.com/DeMaCS
- [Font Awesome Icons 4.7](https://fontawesome.com/v4.7.0/icons/) - Icon set used
- [jQuery](https://jquery.com) and [its UI Layout plugin](http://plugins.jquery.com/layout) - Used to improve the UI
- [jQuery contextMenu 2](https://swisnl.github.io/jQuery-contextMenu/) - Used for to create the context menus
- [keymaster.js](https://github.com/madrobby/keymaster) - Used to implement keyboard shortcuts outside the editor
- [Mousetrap](https://craig.is/killing/mice) - Used to implement keyboard shortcuts outside the editor
- [Pugjs](https://pugjs.org) - Used to create a dynamic html pages
- [Socket.io](https://socket.io) - Used for executor server connection
- [Browsersync](https://www.browsersync.io) - Used to enable the live reload on the browser
- [Gulp](https://gulpjs.com) - Used to automate and enhance the workflow with its plugins:
- [gulp-nodemon](https://github.com/JacksonGariety/gulp-nodemon) - Used to monitor for any changes in the source files and automatically restart the server
- [gulp-babel](https://github.com/babel/gulp-babel#readme) - Used to used to convert ECMAScript 2015+ code into a backwards compatible version of JavaScript
- [gulp-clean](https://github.com/peter-vilja/gulp-clean) - Used to remove files and folders
- [gulp-uglify-es](https://gitlab.com/itayronen/gulp-uglify-es) - Used to minify JS files
- [gulp-autoprefixer](https://github.com/sindresorhus/gulp-autoprefixer#readme) - Used to add CSS prefix
- [gulp-csso](https://github.com/ben-eb/gulp-csso) - Used to minify CSS files
- [gulp-shorthand](https://github.com/kevva/gulp-shorthand) - Used to make the CSS files lighter and more readable
- [gulp-imagemin](https://github.com/sindresorhus/gulp-imagemin#readme) - Used to minify PNG, JPEG, GIF and SVG images

<!--
Expand Down
13 changes: 6 additions & 7 deletions app.js
Expand Up @@ -5,7 +5,6 @@ var http = require('http');
var forceSSL = require('express-force-ssl');
var webSocket = require('websocket').w3cwebsocket;
var fs = require('fs');
var pug = require('pug');
var jpointer = require('json-pointer');
const compression = require('compression');

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

// System config loading
var properties = require('./config/app-config.json');
var loideUrl = properties.loide_url;
var httpPort = properties.port.http;
var httpsPortP = properties.port.https;
var key = properties.path.key;
Expand Down Expand Up @@ -63,8 +63,10 @@ if (key.length !== 0 && cert.length !== 0) {
}

// Sets "Strict-Transport-Security, by default maxAge is set 1 year in seconds
app.use(helmet.hsts({
maxAge: maxAge
app.use(helmet({
hsts: {
maxAge: maxAge
}
}));

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

// Load variables in to the .pug file
app.get('/', function (req, res) {
res.render('index', {"languages": servicesConfig.languages});
res.render('index', {"languages": servicesConfig.languages, "loideUrl": loideUrl});
});

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

client.onerror = function (error) {
print_log('WebSocket problem:\n' + JSON.stringify(error, null, '\t'));
socket.emit('problem', {
reason: error
});
socket.emit('problem', {
reason: 'Execution error, please try again later!'
});
Expand Down
6 changes: 6 additions & 0 deletions config/app-config-schema.json
Expand Up @@ -9,6 +9,12 @@
},
"type": "object",
"properties": {
"loide_url": {
"title": "LoIDE URL",
"description": "This is the URL where the application can be reached",
"type": "string",
"minimum": 0
},
"max_age": {
"title": "HSTS max age",
"description": "This property specifies HTTP Strict Transport Security max age.",
Expand Down
3 changes: 2 additions & 1 deletion config/app-config.json
Expand Up @@ -9,5 +9,6 @@
"key" : "",
"cert" : ""
},
"max_age" : 31536000
"max_age" : 31536000,
"loide_url" : "url"
}
4 changes: 2 additions & 2 deletions gulpfile.js
@@ -1,12 +1,12 @@
const { series, src, dest, parallel } = require('gulp');
const csso = require('gulp-csso');
const shorthand = require('gulp-shorthand');
const clean = require('gulp-clean');
const autoprefixer = require('gulp-autoprefixer');
const uglify = require('gulp-uglify-es').default;
const imagemin = require('gulp-imagemin');
const nodemon = require('gulp-nodemon')
var browserSync = require('browser-sync').create();
var babel = require("gulp-babel");

const path = {
dist: 'dist/',
Expand All @@ -32,7 +32,6 @@ function css() {
.pipe(autoprefixer({
cascade: false
}))
.pipe(shorthand())
.pipe(csso())
.pipe(dest(path.dist + 'css/'))
}
Expand All @@ -56,6 +55,7 @@ function img() {

function js() {
return src(path.src + 'js/**/*.js')
.pipe(babel())
.pipe(uglify())
.pipe(dest(path.dist + 'js/'))
}
Expand Down
12 changes: 7 additions & 5 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "LoIDE",
"version": "2.8.0",
"name": "loide",
"version": "2.9.0",
"description": "Web-based IDE for Logic Programming",
"main": "app.js",
"scripts": {
Expand Down Expand Up @@ -40,25 +40,27 @@
"url": "https://github.com/DeMaCS-UNICAL/LoIDE/issues"
},
"dependencies": {
"ajv": "^6.12.2",
"ajv": "^6.12.4",
"express": "^4.17.1",
"express-force-ssl": "^0.3.2",
"helmet": "^3.21.1",
"json-pointer": "^0.6.0",
"pug": "^3.0.0",
"socket.io": "^2.3.0",
"websocket": "^1.0.30"
"websocket": "^1.0.32"
},
"devDependencies": {
"@babel/core": "^7.11.5",
"@babel/preset-env": "^7.11.5",
"browser-sync": "^2.26.7",
"compression": "^1.7.3",
"gulp": "^4.0.2",
"gulp-autoprefixer": "^7.0.1",
"gulp-babel": "^8.0.0",
"gulp-clean": "^0.4.0",
"gulp-csso": "^4.0.1",
"gulp-imagemin": "^7.1.0",
"gulp-nodemon": "^2.5.0",
"gulp-shorthand": "^1.1.0",
"gulp-uglify-es": "^2.0.0"
},
"analyze": true,
Expand Down
12 changes: 5 additions & 7 deletions resources/css/style.css
Expand Up @@ -102,12 +102,6 @@
}
}

#beta {
font-family: "Dancing Script", cursive;
font-size: 22px;
vertical-align: top;
}

.splashscreen {
position: fixed;
top:0;
Expand Down Expand Up @@ -697,6 +691,10 @@ label[for="run-dot"] {
cursor: pointer;
}

.keybox, .shortcut-title{
font-size: 16px;
}

/*DARK-MODE SECTION*/

body.dark {
Expand Down Expand Up @@ -774,7 +772,7 @@ body.dark .toast-header {
background-color: rgba(144, 144, 144, 0.85);
}

body.dark .navbar-brand {
body.dark .navbar-brand, body.dark .about-logo {
filter: invert(100%);
}

Expand Down

0 comments on commit 58f47d5

Please sign in to comment.