Giter Club home page Giter Club logo

pug-filters's People

Contributors

alubbe avatar ayroblu avatar forbeslindesay avatar sidd avatar timothygu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pug-filters's Issues

Support specifying default-options for filters

We should support passing in options for a given filter as an argument to the handleFilters method. That way I can tell pug that all markdown on a page should use a given highlighter by doing:

pug.compileFile(filename, {
  filterOptions: 
    'markdown-it': {highlight: function (code, lang) { /*...*/ }}
  }
});

Support filter aliases

It would be good if there was an option you could pass in to say that :markdown should use jstransformer-markdown-it, making it easier to swap markdown implementation later.

documentation is extremly lacking

ok, so I spent an entire day trying to get jade filters to work with gulp, namely, markdown, stylus, and coffeescript

the jade documentation is not helpful
http://jade-lang.com/reference/filters/

the jstransformers page it points to is not helpful
https://github.com/jstransformers/jstransformer

the gulp-jstransform page is not helpful
https://github.com/jstransformers/gulp-jstransformer

the jstransformer-stylus page is not helpful
https://www.npmjs.com/package/jstransformer-stylus

the conversations on the subject are not helpful at all
jstransformers/jstransformer#17
pugjs/pug#1928

Please guys, not everyone is a javascript ninja, get your documentation on the subject easier to understand. If filters are a part of jade, how can they be implemented in something like gulp?

There's not gulp gists with an example, nothing relavent I could find through hours of looking through google searches and stack overflow, I feel like I'm going in circles. Please help.

Thank you for your time.

filterOptions doesnt work for filters with include block

If i define filter's options in filterOptions section it merged in pure filters, but doesnt into filters with include block. E.g.:

let compile = pug.renderFile(path.join(inputDir, `${file}.pug`), {
    pretty: true,
    plugins: [cssModules],
    filterOptions: {
        "scss": {
            modules: true,
            includePaths: ['../app/styles', '../app/styles/images'],
            outputStyle: 'compressed',
        },
    }
});

works fine:

        style
            :scss
                body {
                    background-color: #989898;
                }

doesn't work:

style
    include:scss ./styles-pug.scss

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.