Coder Social home page Coder Social logo

pugjs-brunch's People

Contributors

amarcruz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pugjs-brunch's Issues

New pug file not require()able from brunch

Hello,

I am having a problem where creating a new pug file in the watched directory requires a server restart to be recognized when require()ed from another file. Have you experienced this?

16:22:35 - error: Processing of client/template.coffee failed. 
Error: Could not load module 'client/template.pug' from 'client/'.
 Possible solution: add 'client' to package.json and `npm install`.

Compiler outputs error messages even after offending code is removed

This happens to me when using brunch watch.

For example, if you have some invalid code:

| test
  | test
16 Nov 17:48:36 - error: Compiling of static/assets/test.pug failed. static/assets/test.pug:2:1
    1| | test
  > 2|   | test
-------^

unexpected token "indent"

Then make it valid and save:

| test
| test
16 Nov 17:48:36 - error: Compiling of static/assets/test.pug failed. static/assets/test.pug:2:1
    1| | test
  > 2|   | test
-------^

unexpected token "indent"
16 Nov 17:48:38 - error: Compiling of static/assets/test.pug failed. static/assets/test.pug:2:1
    1| | test
  > 2|   | test
-------^

unexpected token "indent"

The indentation error is still being output after every subsequent save. I can delete everything in the file and it still outputs that same error.

Uncaught TypeError: Cannot set property 'pug' of undefined at pug_runtime.js:262

When building a page with brunch and using the plugins standard configuration, with no pug key in in the plugins section of brunch_config.js, the browser console features an error about

Uncaught TypeError: Cannot set property 'pug' of undefined
at pug_runtime.js:262

The code of the site lives in

the output is commited to

and deployed to

We are currently not using pug runtime templates, and only compile one index.pug into HTML, but still wonder about this a little.

How to configure pug plugin in config file ?

I'm using the code

module.exports = { ... templates: { joinTo: 'javascripts/app.js' }, },

plugins: { pugjs: { staticBasedir: 'app/static_pug', staticPretty: true, compileDebug: true, }, ....

But I don't get anything as result. I was trying to change joinTo param, but it didn't work for me. Do you have any thinking ?

wrong directory for includes?

Here is problem:

28 Dec 11:03:08 - error: Compiling of app/templates/index.pug failed. ENOENT: no such file or directory, open 'E:\Downloads\Git\js\lazy-tools\templates\_head.pug'
    at templates/index.pug line 1

My brunch config:

module.exports = {
    ....
    plugins: {
       ....
        pug: {
            staticBasedir: 'app/templates',
            preCompile: true
        }
    }
};

It seems for some reason pug is looking into wrong directory. (app is omitted for some reason?)

UPD: i suspect it might be because filename is passed as templates/index.pug. Not sure if it is not a pug bug.

dependency to @jsbits/deep-clone

I had to manually add @jsbits/deep-clone to my package.json file.
I guess in
ca51f24
the dependency should have been added as a real dependency not only as a dev-dependency. Does that make sense?

Does pugjs-brunch work with auto-reload-brunch?

Hi there,

I'm having trouble getting changes I make to pug files to trigger a browser auto reload.

When I start a new project ('brunch new'), the auto-reload-brunch plugin works fine. But, after installing pugjs-brunch ('npm install --save-dev pugjs-brunch') and adding an index.pug file to my app/assets/ folder, the auto-reloading stops.

The pugjs-brunch plugin updates the index.html version in the public folder, rather than the app/assets/ folder (no index.html is created in app/assets/). Is this the issue?

Do I need to place my pug files elsewhere, or perhaps add some pugjs settings to the brunch-config.js file?

Thanks in advance.

Ignore files?

Is it possible to ignore certain pug files? Because for me it's also building files, that are only extended or included.

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.