1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-27 10:32:58 +02:00
joplin/Assets/TinyMCE/IconPack/gulpfile.js

28 lines
812 B
JavaScript
Raw Permalink Normal View History

const iconPackager = require('@ephox/oxide-icons-tools').iconPackager;
const clean = require('gulp-clean');
const gulp = require('gulp');
const fs = require('fs');
gulp.task('icon-packager', function() {
const contents = fs.readFileSync('package.json');
const name = JSON.parse(contents).iconPackName;
return gulp.src('src/svg/**/*.svg')
.pipe(iconPackager({ name }))
.pipe(gulp.dest('dist'));
});
gulp.task('deploy', function() {
2020-11-05 18:58:23 +02:00
fs.copyFileSync(`${__dirname}/dist/icons/Joplin/icons.js`, `${__dirname}/../../../packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/icons.js`);
return Promise.resolve();
});
gulp.task('clean', function() {
return gulp.src('./dist', {
read: false,
allowEmpty: true,
}).pipe(clean());
});
gulp.task('default', gulp.series('clean', 'icon-packager', 'deploy'));