Skip to content

Commit

Permalink
work on support for socket change in iobroker
Browse files Browse the repository at this point in the history
  • Loading branch information
jogibear9988 committed Feb 6, 2022
1 parent 090518a commit 7f983b2
Show file tree
Hide file tree
Showing 5 changed files with 23,932 additions and 63 deletions.
66 changes: 32 additions & 34 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
var clean = require('gulp-clean');
var concat = require('gulp-concat');
var cleanCSS = require('gulp-clean-css');
var eslint = require('gulp-eslint');
var gulp = require('gulp');
const clean = require('gulp-clean');
const concat = require('gulp-concat');
const cleanCSS = require('gulp-clean-css');
const eslint = require('gulp-eslint');
const gulp = require('gulp');
// var gulpFilter = require('gulp-filter');
// var mainBowerFiles = require('gulp-main-bower-files');
var path = require('path');
var plumber = require('gulp-plumber');
var rename = require('gulp-rename');
var sass = require('gulp-sass');
var sassGlob = require('gulp-sass-glob');
var uglify = require('gulp-uglify');
var watch = require('gulp-watch');
var webserver = require('gulp-webserver');
var through = require('through2');
var pofile = require('pofile');
const path = require('path');
const plumber = require('gulp-plumber');
const rename = require('gulp-rename');
const sass = require('gulp-sass')(require('node-sass'));
const sassGlob = require('gulp-sass-glob');
const uglify = require('gulp-uglify');
const watch = require('gulp-watch');
const webserver = require('gulp-webserver');
const through = require('through2');
const pofile = require('pofile');

const fs = require('fs');
const iopackage = require('./io-package.json');
Expand Down Expand Up @@ -63,16 +63,14 @@ gulp.task('watch', function () {
], ['sass']);
});

gulp.task('server', [
gulp.task('server', gulp.series(
'watch',
'web-server'
], function () {});

'web-server'));

// SASS processing

gulp.task('sass-themes', function () {
gulp.src(src + 'assets/styles/themes/**/*.scss')
return gulp.src(src + 'assets/styles/themes/**/*.scss')
.pipe(plumber())
.pipe(sassGlob())
.pipe(sass())
Expand All @@ -86,7 +84,7 @@ gulp.task('sass-themes', function () {
});

gulp.task('sass-vendor', function () {
gulp.src(src + 'vendor/styles.scss')
return gulp.src(src + 'vendor/styles.scss')
.pipe(plumber())
.pipe(sassGlob())
.pipe(sass())
Expand All @@ -99,10 +97,10 @@ gulp.task('sass-vendor', function () {
.pipe(gulp.dest(dst + 'vendor'));
});

gulp.task('sass', [
gulp.task('sass', gulp.series(
'sass-themes',
'sass-vendor'
], function () {});
));

gulp.task('vendor-fonts', function() {
return gulp.src([
Expand All @@ -117,7 +115,7 @@ gulp.task('uglify-timeline', function () {
.pipe(gulp.dest('bower_components/d3-timeline/dist'));
});

gulp.task('vendor-js', ['uglify-timeline'], function() {
gulp.task('vendor-js', gulp.series('uglify-timeline', function() {
if (!require('fs').existsSync(__dirname + '/bower_components')) {
throw new Error('No Bower files found: please write "bower i".');
}
Expand Down Expand Up @@ -150,17 +148,17 @@ gulp.task('vendor-js', ['uglify-timeline'], function() {
'bower_components/angular-file-saver/dist/angular-file-saver.bundle.min.js',
'bower_components/snapjs/snap.min.js',
'bower_components/angular-snap/angular-snap.min.js',
'bower_components/event-source-polyfill/eventsource.min.js',
'bower_components/event-source-polyfill/src/eventsource.min.js',
'bower_components/d3-timeline/dist/d3-timeline.js',
'bower_components/aCKolor/dist/js/aCKolor.min.js',
'node_modules/n3-charts/build/LineChart.min.js',
src + 'vendor/angular-web-colorpicker.js',
src + 'vendor/conn.js',
src + 'vendor/global.js'
]).pipe(concat('vendor.js')).pipe(gulp.dest(dst + 'vendor'));
});
}));

gulp.task('vendor-edit-js', ['uglify-timeline'], function() {
gulp.task('vendor-edit-js', gulp.series('uglify-timeline', function() {
return gulp.src([
'bower_components/angular/angular.js',
'bower_components/angular-route/angular-route.js',
Expand Down Expand Up @@ -192,7 +190,7 @@ gulp.task('vendor-edit-js', ['uglify-timeline'], function() {
src + 'vendor/angular-web-colorpicker.js',
src + 'vendor/conn.js'
]).pipe(concat('vendor.edit.js')).pipe(gulp.dest(dst + 'vendor'));
});
}));

gulp.task('codemirror-lib', function () {
return gulp.src([
Expand Down Expand Up @@ -258,10 +256,10 @@ gulp.task('src-copy', function () {
src + '!.csscomb.json',
src + 'vendor/vendor.js',
src + 'vendor/styles.min.css'
], {base: src}).pipe(gulp.dest(dst));
], {base: src, allowEmpty: true}).pipe(gulp.dest(dst));
});

gulp.task('codemirror', [
gulp.task('codemirror', gulp.series(
'codemirror-lib',
'codemirror-css',
'codemirror-addon-fold',
Expand All @@ -270,16 +268,16 @@ gulp.task('codemirror', [
'codemirror-mode-xml',
'codemirror-mode-javascript',
'codemirror-theme'
], function () {});
));

gulp.task('vendor', [
gulp.task('vendor', gulp.series(
'sass-themes',
'sass-vendor',
'vendor-js',
// 'vendor-edit-js',
'vendor-fonts',
'src-copy'
], function () {});
));

const translate = require('@vitalets/google-translate-api');

Expand Down Expand Up @@ -340,4 +338,4 @@ gulp.task('translate', async function (done) {
fs.writeFileSync('io-package.json', JSON.stringify(iopackage, null, 4));
});

gulp.task('default', ['vendor', 'codemirror'], function () {});
gulp.task('default', gulp.series('vendor', 'codemirror'));
Loading

0 comments on commit 7f983b2

Please sign in to comment.