Skip to content

Commit

Permalink
- localize template plugin
Browse files Browse the repository at this point in the history
- rename it to jtemplate
- rework the way templates work (now it's ajax based)
  • Loading branch information
dgrammatiko committed May 21, 2023
1 parent c3a740e commit 0024f68
Show file tree
Hide file tree
Showing 8 changed files with 611 additions and 58 deletions.
9 changes: 8 additions & 1 deletion build/build-modules-js/init/exemptions/tinymce.es6.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const {
existsSync, copy, readFile, writeFile, mkdir,
existsSync, copy, readFile, writeFile, mkdir, removeSync,
} = require('fs-extra');
const CssNano = require('cssnano');
const Postcss = require('postcss');
Expand Down Expand Up @@ -94,4 +94,11 @@ module.exports.tinyMCE = async (packageName, version) => {

// Restore our code on the vendor folders
await copy(join(RootPath, 'build/media_source/vendor/tinymce/templates'), join(RootPath, 'media/vendor/tinymce/templates'), { preserveTimestamps: true });
if (existsSync(join(RootPath, 'media/vendor/tinymce/plugins/template'))) {
removeSync(join(RootPath, 'media/vendor/tinymce/plugins/template'));
}
if (!existsSync(join(RootPath, 'media/vendor/tinymce/plugins/jtemplate'))) {
await mkdir(join(RootPath, 'media/vendor/tinymce/plugins/jtemplate'));
}
await copy(join(RootPath, 'build/media_source/vendor/tinymce/plugins/jtemplate'), join(RootPath, 'media/vendor/tinymce/plugins/jtemplate'), { preserveTimestamps: true });
};
1 change: 1 addition & 0 deletions build/build-modules-js/init/minify-vendor.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const folders = [
'media/vendor/qrcode/js',
'media/vendor/short-and-sweet/js',
'media/vendor/webcomponentsjs/js',
'media/vendor/tinymce/plugins/jtemplate',
];

let allFiles = [];
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0024f68

Please sign in to comment.