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

partial() should work with any preprocessor #105

Open
kennethormandy opened this issue Oct 4, 2013 · 5 comments
Open

partial() should work with any preprocessor #105

kennethormandy opened this issue Oct 4, 2013 · 5 comments

Comments

@kennethormandy
Copy link
Collaborator

Expected Behaviour

Inside templating languages, partial() can inline any preprocessed file, like so:

style(type="text/css")=partial("css/" + current.source)

Actual Behaviour

This is only possible with other templating languages plus Markdown.

div=partial("template/" + current.source)
@sintaxi
Copy link
Owner

sintaxi commented Oct 10, 2013

Makes sense.

@anthony-arnold
Copy link

Is there any update on this? I would like to be able to render my less files as an inline style block in order to validate against Google's accelerated mobile pages (which doesn't support linked stylesheets.)

Another option is to make the jade-filter mixin available (or upgrade to PugJS which has a built-in filter feature).

@justindujardin
Copy link

I modified my forks of harp/terraform to support partial LESS files. It works fine for my usage but it breaks some tests and I won't support it, so your mileage may vary.

Diff:
sintaxi/terraform@master...justindujardin:master

Install:

npm i --save git+https://github.com/justindujardin/harp.git

Use:

<head>
  ...
  <%- partial("./_coolstyles.less") %>
</head>
    

@sintaxi
Copy link
Owner

sintaxi commented Jun 17, 2017

Nice job. I can imagine this wasn't easy to get working. Lots of edge cases.

@breytex
Copy link

breytex commented Aug 14, 2018

@sintaxi any chance to get this feature merged into master?
I am also looking forward to include preprocessed scss into jade.

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

No branches or pull requests

5 participants