Questions tagged [marko]

An HTML-based templating engine that compiles templates to Node.js-compatible JavaScript modules and supports streaming, async rendering and custom tags.

Marko is a fast and lightweight HTML-based templating engine that compiles templates to CommonJS modules and supports streaming, async rendering and custom tags.

Learn more on http://markojs.com/.

64 questions
5
votes
3 answers

How to do client side routing in Markojs

how to do client side routing in Markojs. Is there anything inbuild like react router as in react?
Ashik Jyothi
  • 757
  • 10
  • 17
4
votes
1 answer

Svelte vs MarkoJS

I’m working on rebuilding a new project for many reasons. Currently the project uses Marko. I’m investigating if it’s worth moving to svelte. I actually didn’t find a big difference between them. Does one of them has advantage on the other? Why the…
MissPotato
  • 73
  • 6
4
votes
1 answer

How do I render raw HTML in Markojs?

I am using Markojs as my UI library and I am needing to render raw HTML that is included in the data model retrieved from the server. For example, let's say my data model being retrieved from the server looks like so: data = { copy: "
JPritchard9518
  • 182
  • 1
  • 3
  • 11
3
votes
1 answer

Global variable in Marko JS Template and Express

Once I set a global variable in Express using app.use(function(req, res, next){ res.locals.isAuthenticated = true; next(); }); How can I get that variable from inside any view (*.marko template)? I know in Jade you should be able to access it…
crash
  • 4,152
  • 6
  • 33
  • 54
2
votes
0 answers

Compile single marko component with webpack

how can I compile a single marko.js component with webpack or marko-cli, so I can use it as npm module from the npm registry? The component is working well within my projects as an integrated component, but when I install it as an npm module I get…
Teddy95
  • 21
  • 1
2
votes
1 answer

eBay skin not working on HTML web pages but successfully installed

I am currently trying to use the @ebay/skin package for UI elements in my marko project but they don't seem to be working. My package.json file looks like this { "name": "marko-starter-demo", "description": "Demo of how to build an app using…
Edward Muldrew
  • 253
  • 1
  • 6
  • 20
2
votes
0 answers

Vue client-side and Marko server-side (MPA)

In a multi-page web app project, the server part runs on Node.js and Express. Marko is used as a template engine for server-side rendering. Example :

${ out.global.__('user.title') }

ElJackiste
  • 4,011
  • 5
  • 23
  • 36
2
votes
1 answer

Handlebards.js vs Marko.js: What templating library should I use for a portfolio type website? Marko.js or Handlebars.js?

Handlebards.js vs Marko.js: Link to Marko.js library I have to develop a portfolio site for a friend. The majority of the site will be static with things like information about the person, skills, projects etc. The usual stuff. The only part which…
Nauman
  • 894
  • 4
  • 14
  • 45
2
votes
1 answer

Is there a way to access the "window" and "document" references in a marko class?

I am using Marko and am needing to access the window and viewport height. I need the height of a specific div, and the height of the viewport. This is typically achieved by something similar to this var viewportHeight = window.innerHeight var…
JPritchard9518
  • 182
  • 1
  • 3
  • 11
2
votes
1 answer

Getting errors in the MarkoJs "Getting Started" tutorial

I'm a newbie at Node.js and Marko. Getting errors in the "Installing" section. Getting the error when I try the following command: lasso --main client.js --plugins lasso-marko --inject-into index.html Any help will be great. Error: PS…
Pranav Shah
  • 3,233
  • 3
  • 30
  • 47
2
votes
1 answer

Is there a way to use Marko without the require hook extension?

All of the markojs.com documentation says to render your marko templates like so: require('marko/node-require') require('./template.marko').render() However, I couldn't find any ability to render marko templates that don't make use of a require…
balupton
  • 47,113
  • 32
  • 131
  • 182
2
votes
2 answers

How to simulate mouseenter event in Selenium or Javascript?

I've been working on a web UI automation task with Selenium, Javascript and SeLion. I would like to take a screenshot of some equivalent scenario as Google homepage below: In which the "Search by voice" should be present when mouse moves in that…
Almett
  • 876
  • 2
  • 11
  • 34
2
votes
2 answers

How to set marko template engine in expressjs 4.0

I want to use marko template engine along with expressjs 4.0 When I remove the default express template engine I am getting following error Error: No default engine was specified and no extension was provided. at new View…
Dinoop mathew
  • 248
  • 1
  • 4
  • 18
1
vote
0 answers

Has any one gotten @marko/testing-library to work with vitetest?

I have a project in Vite, Fastify and Marko and am trying to use Vitest. I want to test individual components/templates. Say pass in inputs (props) and test if the output (typically HTML) is as expected. The Marko Testing Library supplies this but…
1
vote
1 answer

Rendering from strings instead of files with MarkoJS

I'm using markojs for my emails templates but now we are moving these templates inside our database to edit them online. We still need to use marko to keep our full HTML structure and variables behavior aswell. I've found 2 ways to get templates as…
Splinteer
  • 1,126
  • 4
  • 13
  • 28
1
2 3 4 5