Skip to content

Commit cba328c

Browse files
committed
Change gulp build tool to use gulp-terser for later nodejs version support
1 parent d7a678d commit cba328c

File tree

9 files changed

+83
-42
lines changed

9 files changed

+83
-42
lines changed

.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11

2+
### 3.4.1: Maintenance Release
3+
4+
- Change gulp build tool to use gulp-terser for later nodejs version support
5+
- Fix datepicker to use chaneg not blur to stop Safari sending double messages
6+
27
### 3.4.0: Milestone Release
38

49
- Expose manifest.json display property in settingsjs ui section so can be set fullscreen if desired.

dist/css/gridstack-extra.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/dashboard.appcache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CACHE MANIFEST
2-
# Time: Sun Dec 18 2022 11:13:16 GMT+0000 (Greenwich Mean Time)
2+
# Time: Sat Dec 31 2022 12:52:21 GMT+0000 (Greenwich Mean Time)
33

44
CACHE:
55
i18n.js
@@ -26,4 +26,4 @@ loading.html
2626
NETWORK:
2727
*
2828

29-
# hash: e348c6d469545979847d57875aaf15ea390b49c8efbdd86dc91e283cc2f6d256
29+
# hash: 07bf360fe1eb14f187742aa95f70a4f1e8886bc6be2a67d69996855d92cc8800

dist/js/app.min.js

Lines changed: 45 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fixfa.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,20 @@ fs.readFile('node_modules/material-design-icons-iconfont/dist/material-design-ic
4141
});
4242
}
4343
});
44+
45+
// GridStack layout css patches for sass
46+
fs.readFile('src/gridstack-extra.scss', 'utf8', function (err, file) {
47+
if (err) { return; }
48+
else {
49+
console.log('Fixing up GridStack scss');
50+
const res1 = file
51+
.replace(/ \(100% \/ \$columns\)/g, ' calc(100% \/ \$columns)')
52+
fs.writeFile('src/gridstack-extra.scss', res1, 'utf8', function (err) {
53+
if (err) {
54+
console.log('Failed to re-write file.');
55+
} else {
56+
console.log('Fixed up GridStack scss');
57+
}
58+
});
59+
}
60+
});

gulpfile.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ var
1919
gmanifest = require('gulp-manifest3'),
2020
rename = require('gulp-rename'),
2121
replace = require('gulp-replace'),
22-
sass = require('gulp-sass')(require('node-sass')),
23-
uglify = require('gulp-uglify'),
22+
sass = require('gulp-sass')(require('sass')),
23+
terser = require('gulp-terser'),
2424
gutil = require('gulp-util'),
2525
path = require('path'),
2626
streamqueue = require('streamqueue');
@@ -81,7 +81,7 @@ function js() {
8181
.pipe(gulp.dest('dist/'));
8282

8383
return streamqueue({ objectMode:true }, scripts, templates)
84-
.pipe(gulpif(/[.]min[.]js$/, gutil.noop(), uglify()))
84+
.pipe(gulpif(/[.]min[.]js$/, gutil.noop(), terser()))
8585
.pipe(concat('app.min.js'))
8686
.pipe(header(fs.readFileSync('license.js')))
8787
.pipe(eol('\n'))

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-red-dashboard",
3-
"version": "3.4.0",
3+
"version": "3.4.1",
44
"description": "A set of dashboard nodes for Node-RED",
55
"keywords": [
66
"node-red"
@@ -88,7 +88,7 @@
8888
"compression": "^1.7.4",
8989
"gridstack": "^0.6.4",
9090
"serve-static": "^1.15.0",
91-
"socket.io": "^4.5.2"
91+
"socket.io": "^4.5.4"
9292
},
9393
"devDependencies": {
9494
"angular": "~1.8.3",
@@ -124,15 +124,15 @@
124124
"gulp-rename": "^1.4.0",
125125
"gulp-replace": "^1.1.4",
126126
"gulp-sass": "^5.1.0",
127-
"gulp-uglify": "~3.0.2",
127+
"gulp-terser": "~2.1.0",
128128
"gulp-util": "^3.0.8",
129129
"jquery": "~3.6.2",
130-
"jshint": "~2.13.5",
130+
"jshint": "~2.13.6",
131131
"justgage": "~1.6.1",
132132
"less": "^3.13.1",
133133
"material-design-icons-iconfont": "^6.7.0",
134134
"moment": "~2.29.4",
135-
"node-sass": "^7.0.3",
135+
"sass": "^1.57.1",
136136
"sprintf-js": "^1.1.2",
137137
"streamqueue": "~1.1.2",
138138
"svg-morpheus": "^0.3.0",

src/gridstack-extra.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ $gridstack-columns: 11 !default;
1111
.grid-stack.grid-stack-#{$columns} {
1212

1313
> .grid-stack-item {
14-
min-width: 100% / $columns;
14+
min-width: calc(100% / $columns);
1515

1616
@for $i from 1 through $columns {
17-
&[data-gs-width='#{$i}'] { width: (100% / $columns) * $i; }
18-
&[data-gs-x='#{$i}'] { left: (100% / $columns) * $i; }
19-
&[data-gs-min-width='#{$i}'] { min-width: (100% / $columns) * $i; }
20-
&[data-gs-max-width='#{$i}'] { max-width: (100% / $columns) * $i; }
17+
&[data-gs-width='#{$i}'] { width: calc(100% / $columns) * $i; }
18+
&[data-gs-x='#{$i}'] { left: calc(100% / $columns) * $i; }
19+
&[data-gs-min-width='#{$i}'] { min-width: calc(100% / $columns) * $i; }
20+
&[data-gs-max-width='#{$i}'] { max-width: calc(100% / $columns) * $i; }
2121
}
2222
}
2323
}

0 commit comments

Comments
 (0)