Saving HTML files with same name as Jade file.

58 views
Skip to first unread message

Jesus Galvan

unread,
Sep 5, 2014, 7:38:53 PM9/5/14
to jad...@googlegroups.com

Trying to get jade to save my jade files as HTML files while keeping the same file name.

So the file views/index.jade should save as dist/index.html

Same for additional files.

I am using grunt-contrib-jade

The jade configuration of my Gruntfile:

module.exports = function(grunt){
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    jade: {
      compile: {
        options: {
          pretty: true
        },
        files: {
          'dist/*.html': ['views/*.jade']
        }
      }
    }

  });
  grunt.loadNpmTasks('grunt-contrib-jade');
  grunt.registerTask('default', ['jade']);
};

But it just saves the file as *.html

Reply all
Reply to author
Forward
0 new messages