by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 30 20:39
    winterNebs commented #2703
  • May 30 02:35
    prma85 commented #3094
  • May 29 22:44
    tkafka commented #797
  • May 28 00:13
    zackschuster commented #3258
  • May 27 17:49
    niftylettuce commented #3260
  • May 27 16:30
    jeromew commented #3019
  • May 27 16:30
    jeromew commented #3019
  • May 27 15:20

    ForbesLindesay on master

    Fix TypeScript and add eachOf t… (compare)

  • May 27 15:20
    ForbesLindesay closed #3262
  • May 27 15:20
    rollingversions[bot] commented #3262
  • May 27 15:13
    ForbesLindesay closed #3260
  • May 27 15:13
    ForbesLindesay commented #3260
  • May 27 15:12
    ForbesLindesay labeled #3260
  • May 27 14:56
    ForbesLindesay commented #3260
  • May 27 14:49
    ForbesLindesay commented #3260
  • May 27 13:31
    tapz commented #3260
  • May 26 22:42
    ForbesLindesay closed #3261
  • May 26 22:42
    ForbesLindesay commented #3261
  • May 26 22:18
    ForbesLindesay commented #3261
  • May 26 20:34
    Shinigami92 commented #3262
Star Light
@starlight-tu_gitlab
htmltidy2 is a validation tool, pug is a generation tool. I don't think they are the same.
Mason Mackaman
@Ursi
is there a particular reason why an object syntax (like what is used for the style attribute) isn't used for data attributes?
Mason Mackaman
@Ursi
@t-mart I use include
Lucas Bersier
@bersLucas

Hello. Is there a way to do interpolation with iteration as well?

- var list  = [{name: 'a', age: 20}, {name: 'b', age: 21}, {name: 'c', age: 30}]
script.
  var people = [
  #{each person in list} // how?
]

My desired output would be

<script>
var people = [
 {name: 'a', age: 20}, {name: 'b', age: 21}, {name: 'c', age: 30}
]
<script>
Mason Mackaman
@Ursi
@bersLucas
- var list = [{name: 'a', age: 20}, {name: 'b', age: 21}, {name: 'c', age: 30}]
script.
    var people = #{JSON.stringify(list)};
Lucas Bersier
@bersLucas
My structure is circular, so it's not letting me use JSON.stringify, is there a way to use an iteration loop
Lucas Bersier
@bersLucas

using

script.
  var people = #{list}

results in var people = [Object object, Object object, ...], so the data is there

Mason Mackaman
@Ursi
@bersLucas I don't think the solution you're looking for exists. I think you're just going to have to write a function that takes an object and stringifies it in a way that works for your object, then use interpolation with that function and the object
perhaps try removing the circular references, JSON.stringifying it, and adding them back with some more string
or, if you're just trying to pass the data along, ask yourself if you even need the circular bits at all
r.js
@rjsAdmin_twitter
hello
what do "globals" in the options object do?
nowhere described
Mason Mackaman
@Ursi
Add a list of global names to make accessible in templates
r.js
@rjsAdmin_twitter
i dont see it anywhere as an example
yeah i can read english
example is to be found nowhere
image.png
Mason Mackaman
@Ursi
I've never used it, but my guess would be that {globals: ['variable']} would be the same as {variable}
r.js
@rjsAdmin_twitter
tried it but no, and it doesnt make sense, because what would "variable" do?
i was thinking "location" (as in windows.location.href
globals from the window object? donno
this is a doc issue, totally unclear, i also checked the code, "globals" is used somehow
r.js
@rjsAdmin_twitter
I created an issue
is this project maintained, there seem to be a shitload of issues
Jacob Bogers
@Jacob_Bogers_twitter
zup
chinogarga
@chinogarga
Hi
Mi name es Renzo and I amworking in a proyect mvc c# with pug
but is not core
but my app itswork fine in localhost butwhen I deploy my app in a hosting I cant visualize me views ?
brightwiths
@brightwiths
Hello, Bro and Sis. Looking guide: gulp pub install
Jae Hong Lee
@hongz1
Hi guys, I just installed pug and got warning that code-js version is deprecated. Is this known issue?
佐藤
@aPTdbHnqTFu9cEj_twitter
Hi,When I type sudo npm i -D gulp-pug in the terminal, it returns "ERR! TypeError: Cannot read property 'latest' of undefined". Where is the cause?
I also typed command sudo npm install pug-cli -g,
sudo npm install -g pug,
sudo npm install pug.
Levi Wheatcroft
@leviwheatcroft

Hey, when trying to use the &attributes syntax I'm getting an error:
Cannot read property 'indexOf' of undefined on line 1 at pug_attr (/mnt/c/Users/levi/git/envoy-ubu/node_modules/pug-runtime/index.js:141:25)

index.js:141 is here and pug_attrs is called from here

On line 141, I can't figure out how val could be undefined, if it were, then val == null on line 129 would be true so pug_attr would return ''.
Levi Wheatcroft
@leviwheatcroft
oh wait I figured it out...
so something like this:
render('input(name=name value=value)&attributes({ foo: 'bar' })', { name: 'example', value: undefined })
will throw this error.
Manjeet Verma
@mnjit20
Hi, could anyone help with this error. "Error: Failed to lookup view "index" in views directory "views"
I have deployed a Express API, which is in typescript and using serverless framework.
Shang Heng Wei
@shwei
Hi pug experts, I tried to call pug.compile('extends /extends/template.pug\n\nblock campaign_title\n...'). How do I include the referenced extend file or load extend content in compile call? Thanks!
Jesus Abril
@3rChuss
Hi fellow developers, I have a question about how to inherit child blocks within children
Parent -> Child -> grandChild
//Parent
    body
        include partials/header
        block contenido
        include partials/footer
//Child
extends ../layout/index
block contenido
    // content from components
    block submenu
    // content from grandChild
    block pagina
//GranChild
extends ../index.pug
block pagina
    main.container.mt-2
        .col content bla bla bla
But this is actually not doing rendering
Am only getting the Parent, but content comes empty
Jesus Abril
@3rChuss
any handy hand here?
really apreccitted in avance
Konstantin Budasov
@kbudasov
Hey guys. Is there any ability to get amount of the transfered Children to Mixin via Block?
Konstantin Budasov
@kbudasov
Example:
I have parent Mixin +form-row and I need to know how much +inputs (or other blocks) he received inside of it. So, it should be 2 in this case:
+form-row
   +input(is="email", required)
   +input(is="job-title", required)