Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for jade templates #50

Open
imrane opened this issue Mar 13, 2014 · 3 comments
Open

Support for jade templates #50

imrane opened this issue Mar 13, 2014 · 3 comments

Comments

@imrane
Copy link

imrane commented Mar 13, 2014

Didn't see this in the list of supported types...

@bumbu
Copy link

bumbu commented Nov 18, 2015

You can add it to options as supportedTypes: { 'jade': 'html' }

@naoyeye
Copy link

naoyeye commented Dec 3, 2015

thanks @bumbu , I added supportedTypes: { 'jade': 'html' }, but still not work.

then I modified jade file:
link(rel='stylesheet', href='/stylesheets/preview.css')
replace with:
| <link rel="stylesheet" href="/stylesheets/preview.css">

it's not the best solution but worked successfully for me.

@naoyeye
Copy link

naoyeye commented Dec 3, 2015

The solution above-mentioned not available for this case:

 <!-- build:js /javascripts/preview.pack.js -->
script(src='/bower_components/zepto/zepto.js')
script(src='/bower_components/fastclick/lib/fastclick.js')
script(src='/javascripts/preview.js')
<!-- endbuild -->

so sad. I gave up and defected to string-replace https://github.com/eruizdechavez/grunt-string-replace

'imagesCDN-staging': {
    files: [{
        '<%= paths.dist %>/stylesheets/': '<%= paths.dist %>/stylesheets/*.css'
    }, {
        '<%= paths.dist %>/views/': '<%= paths.dist %>/views/*.jade'
    }],
    options: {
        replacements: [{
            pattern: /\/images\//gi,
            replacement: '//xxxxx.amazonaws.com/xxxxxx/xxxxxx/images/'
        }]
    }
},
'sourcePathInJade-staging': {
    files: [
        {'<%= paths.dist %>/views/': '<%= paths.dist %>/views/*.jade'}
    ],
    options: {
        replacements: [{
            pattern: /\/stylesheets\//gi,
            replacement: '//xxxxx.amazonaws.com/xxxxxx/xxxxxx//stylesheets/'
        }, {
            pattern: /src=\'\/javascripts\//gi,
            replacement: 'src=\'//xxxxx.amazonaws.com/xxxxxx/xxxxxx/javascripts/'
        }]
    }
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants