Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make tinymce works in development and dist environment using grunt?

I am begginer with grunt and bower package managment. I use tinymce package for my app, when i use grunt serve evrything work correctly, and when i use grunt serve:dist, explorer search the tinymce plugins in incorrect path while chrom and mozila find the plugins.

i thought maybe i need to point the plugin url of tinymce to relevant path but it is not possible in constract to theme_url and other attribute of tiny mce.

what can i do? i do not want to copy all tinymce to the dist.

like image 895
Avital Avatar asked Oct 30 '22 23:10

Avital


1 Answers

In Gruntfile.js

// Copies remaining files to places other tasks can use
copy: {
            dist: {
                files: [{
                    expand: true,
                    dot: true,
                    cwd: '<%= yeoman.app %>',
                    dest: '<%= yeoman.dist %>',
                    src: [
                        '*.{ico,png,txt}',
                        '.htaccess',
                        '*.html',
                        'modules/**/*.html',
                        'images/{,*/}*.*',
                        'styles/fonts/{,*/}*.*'
                    ]
                }, {
                    expand: true,
                    cwd: '.tmp/images',
                    dest: '<%= yeoman.dist %>/images',
                    src: ['generated/*']
                }, {
                    expand: true,
                    cwd: 'bower_components/bootstrap-sass-official/assets/fonts/bootstrap/',
                    src: '*',
                    dest: '<%= yeoman.dist %>/fonts'
                }, {
                    expand: true,
                    cwd: 'bower_components/tinymce-dist/themes/modern/',
                    src: ['**'],
                    dest: '<%= yeoman.dist %>/core/themes/modern/'
                }, {       
                    expand: true,
                    cwd: 'bower_components/tinymce-dist/skins/',
                    src: ['**'],
                    dest: '<%= yeoman.dist %>/core/skins/'
                }, {
                    expand: true,
                    cwd: 'bower_components/tinymce-dist/plugins/link/',
                    src: ['**'],
                    dest: '<%= yeoman.dist %>/core/plugins/link/'
                }, {
                    expand: true,
                    cwd: 'bower_components/font-awesome/fonts/',
                    src: '*',
                    dest: '<%= yeoman.dist %>/fonts'
                }]
            },
            styles: {
                expand: true,
                cwd: '<%= yeoman.app %>/modules',
                dest: '.tmp/styles/',
                src: '{,*/}*.css'
            }
        },
like image 69
Surya R Praveen Avatar answered Nov 15 '22 04:11

Surya R Praveen