Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-D committed Nov 26, 2020
2 parents df99a91 + 3420382 commit 3fc1581
Show file tree
Hide file tree
Showing 34 changed files with 905 additions and 587 deletions.
5 changes: 2 additions & 3 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# These are supported funding model platforms

github: [Alex-D]
github: Alex-D
patreon: AlexandreDemode
custom: https://paypal.me/demodealexandre
12 changes: 3 additions & 9 deletions BACKERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

Trumbowyg is an MIT-licensed open source project and completely free to use.

However, the amount of effort needed to maintain and develop new features for
the project is not sustainable without proper financial backing.
However, the amount of effort needed to maintain and develop new features for
the project is not sustainable without proper financial backing.
You can support it's ongoing development by being a backer or a sponsor:

- [Become a backer or sponsor on Patreon](https://www.patreon.com/alexandredemode)
- [One-time donation via PayPal](https://www.paypal.me/demodealexandre/20eur)

Expand All @@ -17,12 +17,6 @@ You can support it's ongoing development by being a backer or a sponsor:
</a>
</p>

<p align="center">
<a href="https://bookingninja.io/?ref=trumbowyg">
<img src="https://rawcdn.githack.com/Alex-D/Trumbowyg/develop/sponsors/bookingninja.png" alt="BookingNinja" width="200px"/>
</a>
</p>

<p align="center">
<a href="https://www.patreon.com/bePatron?c=1176005&rid=1940456">
Become a Sponsor
Expand Down
19 changes: 7 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

Trumbowyg is an MIT-licensed open source project and completely free to use.

However, the amount of effort needed to maintain and develop new features for
the project is not sustainable without proper financial backing.
However, the amount of effort needed to maintain and develop new features for
the project is not sustainable without proper financial backing.
You can support it's ongoing development by being a backer or a sponsor:

- [Become a backer or sponsor on Patreon](https://www.patreon.com/alexandredemode)
- [One-time donation via PayPal](https://www.paypal.me/demodealexandre/20eur)

Expand All @@ -32,10 +32,6 @@ You can support it's ongoing development by being a backer or a sponsor:
<a href="https://avot.nl/?ref=trumbowyg">
<img src="https://cdn.rawgit.com/Alex-D/Trumbowyg/develop/sponsors/avot.svg" alt="avot®" width="200px"/>
</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://bookingninja.io/?ref=trumbowyg">
<img src="https://rawcdn.githack.com/Alex-D/Trumbowyg/develop/sponsors/bookingninja.png" alt="BookingNinja" width="200px"/>
</a>
</p>

<p align="center">
Expand Down Expand Up @@ -80,11 +76,10 @@ Thanks to `node` and `gulp`, you can improve core script, style or icons easily.
First, fork and clone the repository

```bash
cd Trumbowyg # to go into the project's root directory
npm install # to install development dependencies
npm install -g bower gulp # to install bower and gulp command if you don't have them already
bower install # to install Trumbowyg dependencies (ie: jQuery)
gulp build # to build the project
cd Trumbowyg # go into the project's root directory
npm install # install development dependencies
npm run dev # watch mode
npm run build # to build the project
```

`gulp` command launch default Gulp task watcher and rebuild on the fly.
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "trumbowyg",
"version": "2.21.0",
"version": "2.22.0",
"homepage": "https://github.com/Alex-D/Trumbowyg",
"authors": [
{
Expand Down
2 changes: 1 addition & 1 deletion docs/demos/plugins/resizimg.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h2 class="section-title">Resizimg plugin</h2>
<div class="feature">
<h3>Basic usage</h3>
<p>
Images can be resized by click over the image and dragging their bottom-right corner (the red ones).
Images can be resized by click over the image and dragging their bottom-right corner (the white ones).
</p>

<a href="../../documentation/plugins/#plugin-resizimg" class="button button-demo">Read resizimg plugin documentation</a>
Expand Down
3 changes: 0 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -808,9 +808,6 @@ <h2 class="section-title" id="donate">Buy me some beers</h2>
<a href="https://avot.nl/?ref=trumbowyg">
<img src="https://rawcdn.githack.com/Alex-D/Trumbowyg/develop/sponsors/avot.svg" alt="avot®" width="200px"/>
</a>
<a href="https://bookingninja.io/?ref=trumbowyg">
<img src="https://rawcdn.githack.com/Alex-D/Trumbowyg/develop/sponsors/bookingninja.png" alt="BookingNinja" width="200px"/>
</a>

<br>
<br>
Expand Down
66 changes: 36 additions & 30 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,29 +40,29 @@ const bannerLight = [
].join('');


gulp.task('clean', function () {
const clean = function () {
return gulp.src('dist/*')
.pipe(vinylPaths(del));
});
};

gulp.task('test', ['test-scripts', 'test-plugins-scripts', 'test-langs']);
gulp.task('test-scripts', function () {
const testScripts = function () {
return gulp.src(paths.scripts)
.pipe($.jshint())
.pipe($.jshint.reporter('jshint-stylish'));
});
gulp.task('test-plugins-scripts', function () {
};
const testPluginsScripts = function () {
return gulp.src(paths.pluginsScripts)
.pipe($.jshint())
.pipe($.jshint.reporter('jshint-stylish'));
});
gulp.task('test-langs', function () {
};
const testLangs = function () {
return gulp.src(paths.langs)
.pipe($.jshint())
.pipe($.jshint.reporter('jshint-stylish'));
});
};
const test = gulp.parallel(testScripts, testPluginsScripts, testLangs);

gulp.task('scripts', ['test-scripts'], function () {
const scripts = gulp.series(testScripts, function scripts() {
return gulp.src(paths.scripts)
.pipe($.header(banner, {pkg: pkg, description: 'Trumbowyg core file'}))
.pipe($.newer('dist/trumbowyg.js'))
Expand All @@ -76,15 +76,15 @@ gulp.task('scripts', ['test-scripts'], function () {
.pipe($.size({title: 'trumbowyg.min.js'}));
});

gulp.task('plugins-scripts', ['test-scripts'], function () {
const pluginsScripts = gulp.series(testPluginsScripts, function pluginsScripts() {
return gulp.src(paths.pluginsScripts)
.pipe(gulp.dest('dist/plugins/'))
.pipe($.rename({suffix: '.min'}))
.pipe($.uglify())
.pipe(gulp.dest('dist/plugins/'));
});

gulp.task('langs', ['test-langs'], function () {
const langs = gulp.series(testLangs, function langs() {
return gulp.src(paths.langs)
.pipe(gulp.dest('dist/langs/'))
.pipe($.rename({suffix: '.min'}))
Expand All @@ -95,16 +95,16 @@ gulp.task('langs', ['test-langs'], function () {
});


gulp.task('icons', function () {
const icons = function () {
return gulp.src(paths.icons)
.pipe($.rename({prefix: 'trumbowyg-'}))
.pipe($.svgmin())
.pipe($.svgstore({inlineSvg: true}))
.pipe(gulp.dest('dist/ui/'));
});
};


gulp.task('styles', function () {
const styles = function () {
return gulp.src(paths.styles)
.pipe($.sass())
.pipe($.autoprefixer(['last 1 version', '> 1%', 'ff >= 20', 'ie >= 9', 'opera >= 12', 'Android >= 2.2'], {cascade: true}))
Expand All @@ -116,15 +116,15 @@ gulp.task('styles', function () {
.pipe($.header(bannerLight, {pkg: pkg}))
.pipe(gulp.dest('dist/ui/'))
.pipe($.size({title: 'trumbowyg.min.css'}));
});
};

gulp.task('sass-dist', ['styles'], function () {
const sassDist = gulp.series(styles, function sassDist() {
return gulp.src(paths.styles)
.pipe($.header(banner, {pkg: pkg, description: 'Default stylesheet for Trumbowyg editor'}))
.pipe(gulp.dest('dist/ui/sass'));
});

gulp.task('plugins-styles', function () {
const pluginsStyles = function () {
return gulp.src(paths.pluginsStyles)
.pipe($.sass())
.pipe($.autoprefixer(['last 1 version', '> 1%', 'ff >= 20', 'ie >= 9', 'opera >= 12', 'Android >= 2.2'], {cascade: true}))
Expand All @@ -138,30 +138,36 @@ gulp.task('plugins-styles', function () {
.pipe($.header(bannerLight, {pkg: pkg}))
.pipe(gulp.dest('dist/plugins/'))
.pipe($.size({title: 'Plugins styles'}));
});
};

gulp.task('plugins-sass-dist', ['plugins-styles'], function () {
const pluginsSassDist = gulp.series(pluginsStyles, function pluginsSassDist() {
return gulp.src(paths.pluginsStyles)
.pipe($.header(banner, {pkg: pkg, description: 'Default stylesheet for Trumbowyg editor plugin'}))
.pipe(gulp.dest('dist/plugins'));
});


gulp.task('watch', function () {
gulp.watch(paths.icons, ['icons']);
gulp.watch(paths.scripts, ['scripts']);
gulp.watch(paths.langs, ['langs']);
gulp.watch(paths.pluginsScripts, ['plugins-scripts']);
gulp.watch(paths.pluginsStyles, ['plugins-styles']);
gulp.watch(paths.styles, ['styles']);
const watch = function () {
gulp.watch(paths.icons, icons);
gulp.watch(paths.scripts, scripts);
gulp.watch(paths.langs, langs);
gulp.watch(paths.pluginsScripts, pluginsScripts);
gulp.watch(paths.pluginsStyles, pluginsStyles);
gulp.watch(paths.styles, styles);

gulp.watch(['dist/**', 'dist/*/**'], function (file) {
$.livereload.changed(file);
});

$.livereload.listen();
});
};

gulp.task('build', ['scripts', 'plugins-scripts', 'langs', 'icons', 'sass-dist', 'plugins-sass-dist']);
const build = gulp.parallel(scripts, pluginsScripts, langs, icons, sassDist, pluginsSassDist);

gulp.task('default', ['build', 'watch']);
module.exports = {
default: gulp.series(build, watch),
clean,
build,
test,
watch,
}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "trumbowyg",
"title": "Trumbowyg",
"description": "A lightweight WYSIWYG editor",
"version": "2.21.0",
"version": "2.22.0",
"main": "dist/trumbowyg.js",
"homepage": "http://alex-d.github.io/Trumbowyg",
"author": {
Expand All @@ -20,7 +20,7 @@
"license": "MIT",
"devDependencies": {
"del": "2.0.2",
"gulp": "3.9.1",
"gulp": "4.0.2",
"gulp-autoprefixer": "2.2.0",
"gulp-concat": "2.6.0",
"gulp-header": "1.7.1",
Expand All @@ -41,10 +41,10 @@
"vinyl-paths": "2.1.0"
},
"peerDependencies": {
"jQuery": ">=1.8"
"jquery": ">=1.8"
},
"scripts": {
"start": "gulp",
"dev": "gulp",
"build": "gulp build",
"clean": "gulp clean",
"test": "gulp test"
Expand Down
54 changes: 30 additions & 24 deletions plugins/base64/trumbowyg.base64.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
errFileReaderNotSupported: 'FileReader is not supported by your browser.',
errInvalidImage: 'Invalid image file.'
},
cs: {
base64: 'Vložit obrázek',
file: 'Soubor'
},
da: {
base64: 'Billede som base64',
file: 'Fil',
Expand All @@ -36,56 +40,58 @@
base64: 'Image en base64',
file: 'Fichier'
},
cs: {
base64: 'Vložit obrázek',
file: 'Soubor'
hu: {
base64: 'Kép beszúrás inline',
file: 'Fájl',
errFileReaderNotSupported: 'Ez a böngésző nem támogatja a FileReader funkciót.',
errInvalidImage: 'Érvénytelen képfájl.'
},
zh_cn: {
base64: '图片(Base64编码)',
file: '文件'
ja: {
base64: '画像 (Base64形式)',
file: 'ファイル',
errFileReaderNotSupported: 'あなたのブラウザーはFileReaderをサポートしていません',
errInvalidImage: '画像形式が正しくありません'
},
ko: {
base64: '그림 넣기(base64)',
file: '파일',
errFileReaderNotSupported: 'FileReader가 현재 브라우저를 지원하지 않습니다.',
errInvalidImage: '유효하지 않은 파일'
},
nl: {
base64: 'Afbeelding inline',
file: 'Bestand',
errFileReaderNotSupported: 'Uw browser ondersteunt deze functionaliteit niet.',
errInvalidImage: 'De gekozen afbeelding is ongeldig.'
},
pt_br: {
base64: 'Imagem em base64',
file: 'Arquivo',
errFileReaderNotSupported: 'FileReader não é suportado pelo seu navegador.',
errInvalidImage: 'Arquivo de imagem inválido.'
},
ru: {
base64: 'Изображение как код в base64',
file: 'Файл',
errFileReaderNotSupported: 'FileReader не поддерживается вашим браузером.',
errInvalidImage: 'Недопустимый файл изображения.'
},
ja: {
base64: '画像 (Base64形式)',
file: 'ファイル',
errFileReaderNotSupported: 'あなたのブラウザーはFileReaderをサポートしていません',
errInvalidImage: '画像形式が正しくありません'
},
tr: {
base64: 'Base64 olarak resim',
file: 'Dosya',
errFileReaderNotSupported: 'FileReader tarayıcınız tarafından desteklenmiyor.',
errInvalidImage: 'Geçersiz resim dosyası.'
},
zh_cn: {
base64: '图片(Base64编码)',
file: '文件'
},
zh_tw: {
base64: '圖片(base64編碼)',
file: '檔案',
errFileReaderNotSupported: '你的瀏覽器不支援FileReader',
errInvalidImage: '不正確的檔案格式'
},
pt_br: {
base64: 'Imagem em base64',
file: 'Arquivo',
errFileReaderNotSupported: 'FileReader não é suportado pelo seu navegador.',
errInvalidImage: 'Arquivo de imagem inválido.'
},
ko: {
base64: '그림 넣기(base64)',
file: '파일',
errFileReaderNotSupported: 'FileReader가 현재 브라우저를 지원하지 않습니다.',
errInvalidImage: '유효하지 않은 파일'
},
},
// jshint camelcase:true

Expand Down
Loading

0 comments on commit 3fc1581

Please sign in to comment.