mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 13:09:21 +03:00
Rename basefolder 'rainloop' to 'snappymail'
this prevents conflicts with original rainloop
This commit is contained in:
parent
2655f5ea00
commit
d0f686c657
962 changed files with 113 additions and 119 deletions
|
|
@ -1,11 +1,10 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under AGPL 3 */
|
||||
/* SnappyMail Webmail (c) SnappyMail Team | Licensed under AGPL 3 */
|
||||
const path = require('path');
|
||||
const { argv } = require('yargs');
|
||||
|
||||
const config = {
|
||||
head: {
|
||||
rainloop: '/* RainLoop Webmail (c) RainLoop Team | Licensed under RainLoop Software License */',
|
||||
agpl: '/* RainLoop Webmail (c) RainLoop Team | Licensed under AGPL v3 */'
|
||||
agpl: '/* SnappyMail Webmail (c) SnappyMail | Licensed under AGPL v3 */'
|
||||
},
|
||||
devVersion: '0.0.0',
|
||||
releasesPath: 'build/dist/releases',
|
||||
|
|
@ -26,10 +25,10 @@ const config = {
|
|||
};
|
||||
|
||||
config.paths.globjs = 'dev/**/*.js';
|
||||
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.static = 'snappymail/v/' + config.devVersion + '/static/';
|
||||
config.paths.staticJS = 'snappymail/v/' + config.devVersion + '/static/js/';
|
||||
config.paths.staticMinJS = 'snappymail/v/' + config.devVersion + '/static/js/min/';
|
||||
config.paths.staticCSS = 'snappymail/v/' + config.devVersion + '/static/css/';
|
||||
|
||||
config.paths.assets = {
|
||||
src: 'assets/**/*.*'
|
||||
|
|
|
|||
13
tasks/js.js
13
tasks/js.js
|
|
@ -27,7 +27,7 @@ const jsClean = () => del(config.paths.staticJS + '/**/*.{js,map}');
|
|||
const jsBoot = () => {
|
||||
return gulp
|
||||
.src('dev/boot.js')
|
||||
.pipe(gulp.dest('rainloop/v/' + config.devVersion + '/static/js'));
|
||||
.pipe(gulp.dest('snappymail/v/' + config.devVersion + '/static/js'));
|
||||
};
|
||||
|
||||
// libs
|
||||
|
|
@ -69,7 +69,7 @@ const jsMin = () =>
|
|||
})
|
||||
)
|
||||
.pipe(gulpif(config.source, sourcemaps.init({ loadMaps: true })))
|
||||
.pipe(replace(/"rainloop\/v\/([^/]+)\/static\/js\/"/g, '"rainloop/v/$1/static/js/min/"'))
|
||||
.pipe(replace(/"snappymail\/v\/([^/]+)\/static\/js\/"/g, '"snappymail/v/$1/static/js/min/"'))
|
||||
.pipe(rename({ suffix: '.min' }))
|
||||
.pipe(
|
||||
terser({
|
||||
|
|
@ -79,7 +79,16 @@ const jsMin = () =>
|
|||
compress:{
|
||||
ecma: 6,
|
||||
drop_console: true
|
||||
/*
|
||||
,hoist_props: false
|
||||
,keep_fargs: false
|
||||
,toplevel: true
|
||||
,unsafe_arrows: true // Issue with knockoutjs
|
||||
,unsafe_methods: true
|
||||
,unsafe_proto: true
|
||||
*/
|
||||
}
|
||||
// ,mangle: {reserved:['SendMessage']}
|
||||
})
|
||||
)
|
||||
.pipe(eol('\n', true))
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under AGPL 3 */
|
||||
/* SnappyMail Webmail (c) SnappyMail | Licensed under AGPL 3 */
|
||||
/* eslint-disable consistent-return */
|
||||
const gulp = require('gulp');
|
||||
const fs = require('node-fs');
|
||||
|
|
@ -8,20 +8,20 @@ const pkg = require('../package.json');
|
|||
const { config } = require('./config');
|
||||
const { copy, zip, del } = require('./common');
|
||||
|
||||
const rainloopCopy = () => {
|
||||
const snappymailCopy = () => {
|
||||
const versionFull = pkg.version,
|
||||
dist = config.releasesPath + '/webmail/' + versionFull + '/src/';
|
||||
fs.mkdirSync(dist, '0777', true);
|
||||
fs.mkdirSync(dist + 'data');
|
||||
fs.mkdirSync(dist + 'rainloop/v/' + versionFull, '0777', true);
|
||||
fs.mkdirSync(dist + 'snappymail/v/' + versionFull, '0777', true);
|
||||
|
||||
return gulp
|
||||
.src('rainloop/v/' + config.devVersion + '/**/*', { base: 'rainloop/v/' + config.devVersion })
|
||||
.src('snappymail/v/' + config.devVersion + '/**/*', { base: 'snappymail/v/' + config.devVersion })
|
||||
.pipe(chmod(0o644, 0o755))
|
||||
.pipe(gulp.dest(dist + 'rainloop/v/' + versionFull));
|
||||
.pipe(gulp.dest(dist + 'snappymail/v/' + versionFull));
|
||||
};
|
||||
|
||||
const rainloopSetup = (done) => {
|
||||
const snappymailSetup = (done) => {
|
||||
const versionFull = pkg.version,
|
||||
dist = config.releasesPath + '/webmail/' + versionFull + '/src/';
|
||||
fs.writeFileSync(dist + 'data/VERSION', versionFull);
|
||||
|
|
@ -34,24 +34,24 @@ const rainloopSetup = (done) => {
|
|||
.replace("'APP_VERSION', '0.0.0'", "'APP_VERSION', '" + versionFull + "'")
|
||||
);
|
||||
|
||||
fs.writeFileSync(dist + 'rainloop/v/' + versionFull + '/index.php.root', fs.readFileSync(dist + 'index.php'));
|
||||
fs.writeFileSync(dist + 'snappymail/v/' + versionFull + '/index.php.root', fs.readFileSync(dist + 'index.php'));
|
||||
|
||||
if (config.community) {
|
||||
require('rimraf').sync(dist + 'rainloop/v/' + versionFull + '/app/libraries/RainLoop/Providers/Prem.php');
|
||||
require('rimraf').sync(dist + 'snappymail/v/' + versionFull + '/app/libraries/snappymail/Providers/Prem.php');
|
||||
}
|
||||
|
||||
config.destPath = config.releasesPath + '/webmail/' + versionFull + '/';
|
||||
config.cleanPath = dist;
|
||||
config.zipSrcPath = dist;
|
||||
config.zipFile = 'rainloop-' + (config.community ? 'community-' : '') + versionFull + '.zip';
|
||||
config.zipFileShort = 'rainloop-' + (config.community ? 'community-' : '') + 'latest.zip';
|
||||
config.zipFile = 'snappymail-' + (config.community ? 'community-' : '') + versionFull + '.zip';
|
||||
config.zipFileShort = 'snappymail-' + (config.community ? 'community-' : '') + 'latest.zip';
|
||||
|
||||
config.rainloopBuilded = true;
|
||||
config.snappymailBuilded = true;
|
||||
|
||||
done();
|
||||
};
|
||||
|
||||
const rainloopZip = (done) => {
|
||||
const snappymailZip = (done) => {
|
||||
if (config.destPath && config.zipSrcPath && config.zipFile) {
|
||||
return zip(config.zipSrcPath, config.destPath, config.zipFile);
|
||||
}
|
||||
|
|
@ -59,7 +59,7 @@ const rainloopZip = (done) => {
|
|||
done();
|
||||
};
|
||||
|
||||
const rainloopClean = (done) => {
|
||||
const snappymailClean = (done) => {
|
||||
if (config.cleanPath) {
|
||||
return del(config.cleanPath);
|
||||
}
|
||||
|
|
@ -67,8 +67,8 @@ const rainloopClean = (done) => {
|
|||
done();
|
||||
};
|
||||
|
||||
const rainloopShortName = (done) => copy(config.destPath + config.zipFile, config.destPath + config.zipFileShort, done);
|
||||
const snappymailShortName = (done) => copy(config.destPath + config.zipFile, config.destPath + config.zipFileShort, done);
|
||||
|
||||
exports.rainloopBuild = gulp.series(rainloopCopy, rainloopSetup);
|
||||
exports.snappymailBuild = gulp.series(snappymailCopy, snappymailSetup);
|
||||
|
||||
exports.rainloop = gulp.series(exports.rainloopBuild, rainloopZip, rainloopClean, rainloopShortName);
|
||||
exports.snappymail = gulp.series(exports.snappymailBuild, snappymailZip, snappymailClean, snappymailShortName);
|
||||
|
|
@ -6,28 +6,23 @@ const stripbom = require('gulp-stripbom');
|
|||
const { config } = require('./config');
|
||||
const { del } = require('./common');
|
||||
|
||||
// lightgallery
|
||||
const lightgalleryFontsClear = () => del('rainloop/v/' + config.devVersion + '/static/css/fonts/lg.*');
|
||||
|
||||
const lightgallery = gulp.series(lightgalleryFontsClear);
|
||||
|
||||
// fontastic
|
||||
const fontasticFontsClear = () => del('rainloop/v/' + config.devVersion + '/static/css/fonts/snappymail.*');
|
||||
const fontasticFontsClear = () => del('snappymail/v/' + config.devVersion + '/static/css/fonts/snappymail.*');
|
||||
|
||||
const fontasticFontsCopy = () =>
|
||||
gulp
|
||||
.src('vendors/fontastic/fonts/snappymail.*')
|
||||
.pipe(gulp.dest('rainloop/v/' + config.devVersion + '/static/css/fonts'));
|
||||
.pipe(gulp.dest('snappymail/v/' + config.devVersion + '/static/css/fonts'));
|
||||
|
||||
const fontastic = gulp.series(fontasticFontsClear, fontasticFontsCopy);
|
||||
|
||||
// squire
|
||||
const squireClear = () => del('rainloop/v/' + config.devVersion + '/static/squire');
|
||||
const squireClear = () => del('snappymail/v/' + config.devVersion + '/static/squire');
|
||||
|
||||
const squire = gulp.series(squireClear);
|
||||
|
||||
// ckeditor
|
||||
const ckeditorClear = () => del('rainloop/v/' + config.devVersion + '/static/ckeditor');
|
||||
const ckeditorClear = () => del('snappymail/v/' + config.devVersion + '/static/ckeditor');
|
||||
|
||||
const ckeditorCopy = () =>
|
||||
gulp
|
||||
|
|
@ -37,21 +32,21 @@ const ckeditorCopy = () =>
|
|||
'!vendors/ckeditor/adapters{,/**}',
|
||||
'!vendors/ckeditor/*.md'
|
||||
])
|
||||
.pipe(gulp.dest('rainloop/v/' + config.devVersion + '/static/ckeditor'));
|
||||
.pipe(gulp.dest('snappymail/v/' + config.devVersion + '/static/ckeditor'));
|
||||
|
||||
const ckeditorCopyPlugins = () =>
|
||||
gulp
|
||||
.src('vendors/ckeditor-plugins/**/*')
|
||||
.pipe(gulp.dest('rainloop/v/' + config.devVersion + '/static/ckeditor/plugins'));
|
||||
.pipe(gulp.dest('snappymail/v/' + config.devVersion + '/static/ckeditor/plugins'));
|
||||
|
||||
const ckeditorSetup = () =>
|
||||
gulp
|
||||
.src('rainloop/v/' + config.devVersion + '/static/ckeditor/*.js')
|
||||
.src('snappymail/v/' + config.devVersion + '/static/ckeditor/*.js')
|
||||
.pipe(stripbom())
|
||||
// eslint-disable-next-line quotes
|
||||
.pipe(header('\uFEFF')) // BOM
|
||||
.pipe(gulp.dest('rainloop/v/' + config.devVersion + '/static/ckeditor'));
|
||||
.pipe(gulp.dest('snappymail/v/' + config.devVersion + '/static/ckeditor'));
|
||||
|
||||
const ckeditor = gulp.series(ckeditorClear, ckeditorCopy, ckeditorCopyPlugins, ckeditorSetup);
|
||||
|
||||
exports.vendors = gulp.parallel(squire, ckeditor, fontastic, lightgallery);
|
||||
exports.vendors = gulp.parallel(squire, ckeditor, fontastic);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue