amarcruz / pugjs-brunch Goto Github PK
View Code? Open in Web Editor NEWAdds Pug (aka Jade) support to brunch.
License: MIT License
Adds Pug (aka Jade) support to brunch.
License: MIT License
http://brunch.io/docs/plugins#method-getdependencies-file-array-path-
Method: getDependencies(file): Array[Path]
Given a file, this should return a list of file paths that depend on this one.
However, the current getDependencies
returns "a list of file paths that this one depends on", not "a list of file paths that depend on this one".
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`.
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.
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.
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 ?
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.
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?
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.
Is it possible to ignore certain pug files? Because for me it's also building files, that are only extended or included.
The function pug.compile
currently used for static assets does not return dependencies.
Please use pug.compileClientWithDependenciesTracked
instead.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.