deedubs / require-jade

Add jade to requireJS
MIT License
55 stars 17 forks source link

Uncaught Error: failed to require "fs" #30

Open mildfuzz opened 10 years ago

mildfuzz commented 10 years ago

Getting Uncaught Error: failed to require "fs" when I try to include a jade template:

require.config({
    baseUrl: '/',
    paths: {
        'jade': 'require-jade/jade'
    }
});

require(['jade!contact'], function(contact) {
});

Template is being served by an express.js server.

crissdev commented 10 years ago

I guess you have either extends either include in your template. These features are not currently supported by this plugin.

mildfuzz commented 10 years ago

I do have extends. Okay, I can refactor my templates to not use this functionality, but do we know what are the blockers to adding this support to the plugin?

crissdev commented 10 years ago

@mildfuzz To be honest, I tried to have this feature but it turned out to be more complicated than I thought. Since I am working with Webstorm it was easy for me to setup a file watcher and generate the HTML for any JADE in the project. Since you won't publish your JADE files to your production server (I guess) you could do the same or use this Grunt plugin.

Please have in mind that the plugin is using Jave v0.30.0 - the latest version of Jade is 1.3.1

mildfuzz commented 10 years ago

So should now be considered 'unsupported'?— Sent from Mailbox

On Thu, May 15, 2014 at 10:10 AM, Cristian Trifan notifications@github.com wrote:

@mildfuzz To be honest, I tried to have this feature but it turned out to be more complicated than I thought. Since I am working with Webstorm it was easy for me to setup a file watcher and generate the HTML for any JADE in the project. Since you won't publish your JADE files to your production server (I guess) you could do the same or use this Grunt plugin.

Please have in mind that the plugin is using Jave v0.30.0 - the latest version of Jade is 1.3.1

Reply to this email directly or view it on GitHub: https://github.com/deedubs/require-jade/issues/30#issuecomment-43185701

crissdev commented 10 years ago

Well I'm not the one to say this...but this shouldn't be a stopper for your project. There is this fork that might have what you're looking for.