paulyoung / jade-inheritance

Reduce compilation time for Jade files by understanding inheritance.
MIT License
40 stars 13 forks source link

Can you update jade version? #15

Open crecotun opened 8 years ago

crecotun commented 8 years ago

Hi, current version of jade is 1.11. It includes feature 'block code support' and a lot of improvements. Can you update version in package.json?

paulyoung commented 8 years ago

Hi @Krekotun. I think #13 would achieve that, where I've outlined some things we need to figure out first.

My understanding is that 1.11.0 has changes which aren't yet compatible with this project, so we can't just update to the latest version.

In #13 I mentioned that I'd like to allow consumers to be able to provide their own version of Jade so that they're not bound to any particular version beyond their control.

crecotun commented 8 years ago

@paulyoung it would be awesome to add some tests in repo, so you/consumer will see if new version of jade is breaking something.

I'd like to allow consumers to be able to provide their own version of Jade

Do you have any ideas how to make this?

paulyoung commented 8 years ago

@Krekotun instead of:

var JadeInheritance = require('jade-inheritance');
var inheritance = new JadeInheritance('foo.jade');

something like:

var jade = require("jade");
var JadeInheritance = require('jade-inheritance');
var inheritance = new JadeInheritance(jade, 'foo.jade');
crecotun commented 8 years ago

@paulyoung nice, how soon do you plan to implements this?

alex-shamshurin commented 8 years ago

Huy guys, I use gulp-jade-inheritance but jade is used here differs from gulp-jade (1.11). I also want to use code blocks, like

- 
   var list = [
     ....
  ]

but jade 1.9 fails. How to solve it?

alex-shamshurin commented 8 years ago

I just updated package.json to "jade": "^1.11.0" and ran "npm -i" and code blocks now works.

boxman0617 commented 8 years ago

Is there an actual fix? I updated the version of Jade in our package.json but it is not working. Only way i found was to use npm-shrinkwrap.

alex-shamshurin commented 8 years ago

Hmm, I changed nothing except the version and I have everything working.

natrey commented 8 years ago

Having the same problem using "gulp-jade": "^1.1.0" as it is the last version. Getting error on jade code blocks like that

 -  
      var array = [    
        {
            title:'',
            content:''
         }
      ]

Error: unexpected text -\n src\test.jade\n at Object.Lexer.fail Tried to update to gulp-pug instead, but it didn't work out.

alex-shamshurin commented 8 years ago

The issue is with your package.json. Check it, it must work

natrey commented 8 years ago

salex772, thanks! I changed the version of jade in jade-inheritance as you recommended here issue 14 and it works now!