Skip to content

Commit faffe6f

Browse files
build widget in CI
1 parent 6a044ad commit faffe6f

File tree

6 files changed

+1967
-1230
lines changed

6 files changed

+1967
-1230
lines changed

.github/workflows/build-widget.yml

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