Skip to content

Commit

Permalink
Upgraded less plugin that was throwing a warning. Migrated from the 5…
Browse files Browse the repository at this point in the history
… year old grunt-unicode to a dedicated uglify config that does effectively the same thing.
  • Loading branch information
TheSpyder committed Mar 12, 2019
1 parent a8aeef1 commit a38086d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
28 changes: 16 additions & 12 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,17 +146,6 @@ module.exports = function (grunt) {
})
),

unicode: {
'emoticons-plugin': {
files: [
{
src: 'src/plugins/emoticons/main/js/*.js',
dest: 'js/tinymce/plugins/emoticons/js/emojis.js'
}
]
}
},

uglify: Object.assign(
{
options: {
Expand All @@ -171,11 +160,24 @@ module.exports = function (grunt) {
{ src: 'js/tinymce/tinymce.js', dest: 'js/tinymce/tinymce.min.js' },
{ src: 'src/core/main/js/JqueryIntegration.js', dest: 'js/tinymce/jquery.tinymce.min.js' }
]
},
// very similar to the emoticons plugin, except mangle is off
'emoticons-raw': {
options: {
mangle: false,
compress: false,
beautify: {
indent_level: 2
}
},
files: [
{ src: 'src/plugins/emoticons/main/js/emojis.js', dest: 'js/tinymce/plugins/emoticons/js/emojis.js' }
]
}
},
gruntUtils.generate(plugins, 'plugin', (name) => {
var pluginExtras = {
emoticons: [ { src: 'js/tinymce/plugins/emoticons/js/emojis.js', dest: 'js/tinymce/plugins/emoticons/js/emojis.min.js' } ]
emoticons: [ { src: 'src/plugins/emoticons/main/js/emojis.js', dest: 'js/tinymce/plugins/emoticons/js/emojis.min.js' } ]
};
return {
files: [
Expand Down Expand Up @@ -829,6 +831,8 @@ module.exports = function (grunt) {
'copy'
]);

grunt.registerTask('unicode', ['uglify:emoticons-raw'])

grunt.registerTask('start', ['webpack-dev-server']);

grunt.registerTask('default', ['clean', 'prod']);
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,10 @@
"grunt-contrib-uglify": "4.0.0",
"grunt-contrib-watch": "^1.1.0",
"grunt-nuget-pack": "^0.0.6",
"grunt-replace": "^1.0.1",
"grunt-shell": "^2.1.0",
"grunt-tslint": "^5.0.1",
"grunt-unicode": "^0.1.4",
"grunt-webpack": "^3.1.2",
"less-plugin-autoprefix": "^1.5.1",
"less-plugin-autoprefix": "^2.0.0",
"load-grunt-tasks": "^4.0.0",
"moxie-zip": "~0.0.3",
"string-replace-loader": "^2.1.1",
Expand Down

0 comments on commit a38086d

Please sign in to comment.