Skip to content

Commit 468c5e4

Browse files
build widget in CI
1 parent 6a044ad commit 468c5e4

File tree

6 files changed

+1958
-1230
lines changed

6 files changed

+1958
-1230
lines changed

.github/workflows/build-widget.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build widget
2+
on:
3+
push:
4+
paths:
5+
- "widget/**"
6+
pull_request:
7+
paths:
8+
- "widget/**"
9+
workflow_dispatch:
10+
defaults:
11+
run:
12+
working-directory: ./widget
13+
jobs:
14+
build-widget:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18+
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
19+
with:
20+
node-version: 6
21+
cache: "npm"
22+
cache-dependency-path: widget/package-lock.json
23+
- name: "Install dependencies"
24+
run: npm install
25+
- name: "Build widget"
26+
run: npm run build
27+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
28+
with:
29+
path: widget/dist/MxPushNotifications.mpk

widget/.jshintrc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
// Enforcing
2+
"esversion": 6,
33
"curly" : false,
44
"forin" : false,
55
"latedef" : "nofunc",
@@ -12,11 +12,7 @@
1212
"mx" : false,
1313
"logger" : false
1414
},
15-
16-
// Relaxing
1715
"laxbreak" : true,
18-
19-
// Environments
2016
"browser" : true,
2117
"devel" : true,
2218
"dojo" : true

widget/.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lts/boron

widget/Gulpfile.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"use strict";
44

55
// In case you seem to have trouble starting Mendix through `gulp modeler`, you might have to set the path to the Mendix application, otherwise leave both values as they are
6-
var MODELER_PATH = null;
7-
var MODELER_ARGS = "/file:{path}";
6+
const MODELER_PATH = null;
7+
const MODELER_ARGS = "/file:{path}";
88

99
/********************************************************************************
1010
* Do not edit anything below, unless you know what you are doing
1111
********************************************************************************/
12-
var gulp = require("gulp"),
12+
const gulp = require("gulp"),
1313
zip = require("gulp-zip"),
1414
del = require("del"),
1515
newer = require("gulp-newer"),
@@ -22,14 +22,14 @@ var gulp = require("gulp"),
2222
widgetBuilderHelper = require("widgetbuilder-gulp-helper"),
2323
jsValidate = require("gulp-jsvalidate");
2424

25-
var pkg = require("./package.json"),
25+
const pkg = require("./package.json"),
2626
paths = widgetBuilderHelper.generatePaths(pkg),
2727
xmlversion = widgetBuilderHelper.xmlversion;
2828

29-
gulp.task("default", ['build'], function() {
29+
gulp.task("default", ["build"], function() {
3030
gulp.watch("./src/**/*", ["compress"]);
3131
gulp.watch("./src/**/*.js", ["copy:js"]);
32-
gulp.watch("./src/**/*.html", ["copy:html"])
32+
gulp.watch("./src/**/*.html", ["copy:html"]);
3333
});
3434

3535
gulp.task("clean", function () {
@@ -49,7 +49,7 @@ gulp.task("compress", ["clean"], function () {
4949
gulp.task("copy:js", function () {
5050
return gulp.src(["./src/**/*.js"])
5151
.pipe(plumber(function (error) {
52-
var msg = gutil.colors.red("Error");
52+
let msg = gutil.colors.red("Error");
5353
if (error.fileName) {
5454
msg += gutil.colors.red(" in ") + gutil.colors.cyan(error.fileName);
5555
}
@@ -84,7 +84,7 @@ gulp.task("version:json", function () {
8484
});
8585

8686
gulp.task("icon", function (cb) {
87-
var icon = (typeof argv.file !== "undefined") ? argv.file : "./icon.png";
87+
const icon = (typeof argv.file !== "undefined") ? argv.file : "./icon.png";
8888
console.log("\nUsing this file to create a base64 string: " + gutil.colors.cyan(icon));
8989
gulp.src(icon)
9090
.pipe(intercept(function (file) {
@@ -94,7 +94,7 @@ gulp.task("icon", function (cb) {
9494
});
9595

9696
gulp.task("folders", function () {
97-
paths.showPaths(); return;
97+
paths.showPaths();
9898
});
9999

100100
gulp.task("modeler", function (cb) {

0 commit comments

Comments
 (0)