0

i'm trying to compile my jade files for an SPA with grunt, and it works ... well, "works..."

my folders:

  • app
    • views
      • build
        • any compiled .html
    • any .jade file
  • index.jade
  • index.html

and my gruntfile.coffee task:

      jade:
        compile:
        options:
          pretty: true
        files:
            [
              extend: true
              flatten: true
              cwd: 'app/views'
              src: '**/*.jade'
              dest: 'app/views/build'
              ext: '.html'
            ]
        compileIndex:
          options:
          pretty: true
          files: 'app/index.html': ['app/index.jade']

Well, i read another questions here like Grunt compiling Jade files but i can get it work fine, when i try to run grunt jade, two things happens; compileIdex works totally fine,but, when compile task run:

Running tasks: jade:compile

Running "jade:compile" (jade) task
Verifying property jade.compile exists in config...OK
Files: prueba.jade -> app/views/build
Options: namespace="JST", separator="\n\n", amd=false, pretty
>> Source file "prueba.jade" not found.
>> Destination not written because compiled files were empty.

So what i'm doing wrong here? I need to keep separate compilations, index and views.

Community
  • 1
  • 1
Nano
  • 837
  • 4
  • 19
  • 37
  • What is the content of `prueba.jade`? – Krasimir Feb 12 '14 at 20:47
  • Typically when I see this it's a combination of the `src` and `cwd` options. Can you post more of your directory structure? Like where exactly the *.jade files are? Are they only in the `app/views` directory, or in sub-directories? – Jordan Kasper Feb 13 '14 at 16:58
  • I have all views items in app/views, and the index.jade in the app/ (root of application), no more jade files in another place. Ahm, @Krasimir just have an p.example element, it's just a test :/ – Nano Feb 14 '14 at 13:53
  • Anyway, you can see the folders structure [here](http://imgur.com/fNX03V4) (sorry for the delay) – Nano Feb 18 '14 at 20:59

0 Answers0