Droppped momentjs in favor of Intl

Uses a fallback for Intl.RelativeTimeFormat in Date.prototype.fromNow
This commit is contained in:
djmaze 2020-10-15 10:45:18 +02:00
parent 6f585e1f1d
commit 3bfe2c67d1
17 changed files with 478 additions and 97 deletions

View file

@ -30,7 +30,6 @@ config.paths.static = 'rainloop/v/' + config.devVersion + '/static/';
config.paths.staticJS = 'rainloop/v/' + config.devVersion + '/static/js/';
config.paths.staticMinJS = 'rainloop/v/' + config.devVersion + '/static/js/min/';
config.paths.staticCSS = 'rainloop/v/' + config.devVersion + '/static/css/';
config.paths.momentLocales = 'rainloop/v/' + config.devVersion + '/app/localization/moment/';
config.paths.assets = {
src: 'assets/**/*.*'
@ -65,9 +64,6 @@ config.paths.css = {
};
config.paths.js = {
moment: {
locales: ['node_modules/moment/locale/*.js']
},
libs: {
name: 'libs.js',
src: [

View file

@ -6,13 +6,6 @@ const stripbom = require('gulp-stripbom');
const { config } = require('./config');
const { del } = require('./common');
// moment
const momentLocalesClear = () => del('rainloop/v/' + config.devVersion + '/app/localization/moment/*.js');
const momentLocales = () => gulp.src(config.paths.js.moment.locales).pipe(gulp.dest(config.paths.momentLocales));
const moment = gulp.series(momentLocalesClear, momentLocales);
// lightgallery
const lightgalleryFontsClear = () => del('rainloop/v/' + config.devVersion + '/static/css/fonts/lg.*');
@ -61,4 +54,4 @@ const ckeditorSetup = () =>
const ckeditor = gulp.series(ckeditorClear, ckeditorCopy, ckeditorCopyPlugins, ckeditorSetup);
exports.vendors = gulp.parallel(moment, squire, ckeditor, fontastic, lightgallery);
exports.vendors = gulp.parallel(squire, ckeditor, fontastic, lightgallery);