Javascript-форум (https://javascript.ru/forum/)
-   Оффтопик (https://javascript.ru/forum/offtopic/)
-   -   Настройка pug в Gruntfile (https://javascript.ru/forum/offtopic/69569-nastrojjka-pug-v-gruntfile.html)

Giorgi 03.07.2017 18:27

Настройка pug в Gruntfile
 
Добрый день! вопрос вот в чем pug минифицирует html файл а мне нужно чтоб но не минифицировал
Скриншот html как делает :http://prntscr.com/fr4dyq

А нужно чтоб было так :http://prntscr.com/fr4i08

Как настроен Gruntfile :
module.exports = function(grunt) {





  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
     

    sass: {
      dist: {
      	files: {
      		'css/style.css' : 'sass/style.scss'
      	}
      }
    },


    cssmin: {
    	my_terget: {
    		files: [{
    			expand: true,
    			cwd: 'dist/css/', 
    			src: ['*css', '!*.min.css'],
    			dest: 'build/css/', 
    			ext: '.min.css' 
    		}]
    	}
    },


     imagemin: {
      dist: {
          options: {
            optimizationLevel: 6,
            progressive: true
        },

        files: [{
          expand: true,
          cwd: 'dist/images/',
          src: ['*.{png,jpg,gif}'],
          dest: 'build/images/'
        }]
      }
    },

    pug: {
      debug: {
        options: {
          data: {
            debug: true
          }
        },
        files: {
          'build/index.html' : 'index.pug'
        }
      }
    }

    
     
  });
  



  grunt.loadNpmTasks('grunt-contrib-cssmin');
  grunt.loadNpmTasks('grunt-contrib-sass');
  grunt.loadNpmTasks('grunt-contrib-pug');
  grunt.loadNpmTasks('grunt-contrib-imagemin');


 grunt.registerTask('default', ['imagemin', 'cssmin', 'sass', 'pug']);

};

Giorgi 04.07.2017 09:33

Проблема решена
pug: {
      dist: {
        options: {
          pretty: true
        },
        files: [{
          expand: true,
          dest: 'build/',
          cwd: 'dist/pug/',
          src: '*.pug',
          ext: '.html'
        }]
      }
    },


Часовой пояс GMT +3, время: 05:03.